Samuel Hinton
03/01/2023, 2:22 AMtask that fetches data returns it in the same pd.DataFrame format, so our save_to_db task is very general.
Now what I was wanting to do was something like the following:
for data_task in list_of_data_tasks:
@flow(name=f"{data_task.__name__} flow", task_runner=dask_task_runner)
def anonymous_flow():
data = data_task.submit()
save_to_db_task.submit(data)
Deployment.build_from_flow(...).apply()
I thought “yeah this is good, it saves tons and tons of duplicated @flow declarations and duplicated save_to_db lines. However, this won’t work because the flow is dynamic, so an agent wont be able to actually find it.
What would be the best practise solution for the above?Samuel Hinton
03/01/2023, 5:23 AMSamuel Hinton
03/01/2023, 9:13 AM