Fina Silva-Santisteban
03/30/2022, 6:52 PMflow.set_dependencies(
task=SnowflakeQuery,
keyword_tasks=dict(query='''SELECT * FROM dummy_table;'''
)
)
flow.set_dependencies(
task=save_query_result_as_df,
keyword_tasks=dict(result_set=SnowflakeQuery)
)
The task save_query_result_as_df
currently only does a print()
of the result_set
. I’m confused about a few things:
• I didn’t provide the SnowflakeQuery
with any authentication. Why doesn’t it throw an error about that?
• The print statement prints out <class 'prefect.tasks.snowflake.snowflake.SnowflakeQuery'>
, which makes me think the snowflakequery task wasn’t run? If it wasn’t run it would at least explain why it didn’t throw an error 😅 but how can I make it run?alex
03/30/2022, 6:55 PMSnowflakeQuery
task class to use within your flow. Something like this
snowflake_task = SnowflakeQuery()
flow.set_dependencies(
task=snowflake_task,
keyword_tasks=dict(query='''SELECT * FROM dummy_table;'''
)
)
Kevin Kho
Fina Silva-Santisteban
03/30/2022, 6:58 PMFina Silva-Santisteban
03/31/2022, 5:01 PMList[List]: output of cursor.fetchall()
, which is not the most useful since I need the result set as a dataframe. 😓 I’ll need to set up and use the snowflake.connector
and pd.read_sql()
to get what I need. Can I submit this somewhere as a feature request??Kevin Kho
Kevin Kho
alex
03/31/2022, 5:20 PM