Jan Domanski
05/09/2022, 6:37 PMKevin Kho
05/09/2022, 6:41 PMJan Domanski
05/09/2022, 6:50 PMimport pandas as pd
@task
def get_db_generator():
with get_connection() as connection:
return pd.read_sql_query(query, connection, chunksize=10)
I want this to return the generator but instead it returns the future. So thenKevin Kho
05/09/2022, 6:52 PMget_db_generator().result()
to wait for the result, but you can just pass the future to a downstream task and the future will be used. Not sure about generators though, will have to checkJan Domanski
05/09/2022, 6:57 PMKevin Kho
05/09/2022, 7:01 PMJan Domanski
05/09/2022, 7:02 PMKevin Kho
05/10/2022, 3:07 PM