Wei Hao Quek
02/27/2023, 9:23 AMimport pandas as pd
from dagster import IOManager, InputContext, OutputContext
class MyIOManager(IOManager):
def handle_output(self, context: OutputContext, obj: pd.DataFrame) -> None:
# Push it into a PostgreSQL database
# Save its returning index to a file
pass
def load_input(self, context: InputContext) -> pd.DataFrame:
# Read the index from the file
# Pull from PostgreSQL database using the index
pass
However, saving to a file and read from it does not seem right to me. Can someone shed some lights on me if there is a better way to do this?
Thank you in advance. 🙂Vinnie
02/27/2023, 9:39 AMPeter Davidson
02/27/2023, 9:48 AMWei Hao Quek
02/27/2023, 10:24 AMWei Hao Quek
02/27/2023, 10:35 AMVinnie
02/27/2023, 10:48 AMWei Hao Quek
02/27/2023, 2:42 PMDaniel Gafni
02/27/2023, 9:30 PMDaniel Gafni
02/27/2023, 9:36 PMWei Hao Quek
02/28/2023, 12:55 AM