Jan Domanski
05/09/2022, 6:37 PMKevin Kho
Jan 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
get_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
Jan Domanski
05/09/2022, 7:02 PMKevin Kho