Shawn Marhanka
09/04/2020, 9:27 PMUserWarning: Tasks were created but not added to the flow: {<Task: Flo Run Task Flow>}. This can occur when `Task` classes, including `Parameters`, are instantiated inside a `with flow:` block but not added to the flow either explicitly or as the input to another task.
Thank younicholas
Shawn Marhanka
09/04/2020, 9:34 PMfrom prefect import Flow, Parameter
from prefect.tasks.prefect.flow_run import FlowRunTask
...task imports
with Flow("Observe Data Flow") as observe_data_flow:
uuid = Parameter("uuid")
data = Parameter("data")
observations_list = Parameter("observations")
observer = Parameter("observer")
callback_app = Parameter("callback_app")
...tasks translating data
merged_observation_list = flatten_observations([observations_list, other_task_result])
next_flow_params = build_parameters(
uuid,
merged_observation_list,
callback_app
)
trigger_flow_run = FlowRunTask(project_name="Project", flow_name="Flow Name", parameters=next_flow_params)
Thanks for the quick replynicholas
()
to the end like this:
trigger_flow_run = FlowRunTask(project_name="Project", flow_name="Flow Name", parameters=next_flow_params)()
Shawn Marhanka
09/04/2020, 9:43 PMobserve_data_flow.tasks
set. However, when I run visualize(), it sets the FlowRunTask task off by itself. It isn’t downstream from the next_flow_params
task like I would think it would be. The result of next_flow_params should feed the parameters of the FlowRunTask. Do you have to explicitly set that?nicholas
()
you just added, which will look something like this:
trigger_flow_run = FlowRunTask(project_name="Project", flow_name="Flow Name")(parameters=next_flow_params)
Shawn Marhanka
09/04/2020, 9:48 PMnicholas
FlowRunTask
Class but never calling it, which is what Prefect looks for when building your Flow metadataShawn Marhanka
09/04/2020, 9:56 PMnicholas