Madison Schott
07/07/2021, 2:30 PMFiveTranSyncTask()? Also is it ok if I just have the dbt_task defined before this with the parameters needed?
user_profile_w_campaign = Flow("User Profile with Campaign")
user_profile_w_campaign.set_dependencies(
task=dbt_task,
upstream_tasks=[FivetranSyncTask()]
)
user_profile_w_campaign.run()Kevin Kho
five_tran_task = FiveTranSyncTask(arg1, arg2)
dbt_task = DbtShellTask(arg1, arg2)
with Flow("User Profile with Campaign") as user_profile_flow:
output1 = five_tran_task(input1, input2)
output2 = dbt_task(input1, input2)
output2.set_upstream(output1)
user_profile_flow.run()Kevin Kho
upstream_tasks as a kwarg
with Flow("Trigger example") as flow:
success = task_b(upstream_tasks=[task_a])
fail = task_c(upstream_tasks=[task_a])Madison Schott
07/07/2021, 2:51 PMKevin Kho
init and a run . The one above the flow block is the init. The one inside is the run. Imagine you have something like a task that outputs something you need for dbt_task or five_tran_task, you can pass it through the run method because it won’t be available during init. Other examples are connections stored as Secrets or Parameters. They can be passed during the run. It is fully possible that the init gives you everything you need and the run will just be output1 = dbt_task().
We are recommending to use the run more though because that’s when Parameters become available.Madison Schott
07/07/2021, 3:06 PMNameError: name 'FiveTranSyncTask' is not definedKevin Kho
Madison Schott
07/07/2021, 3:15 PMTypeError: str expected, not NoneTypeKevin Kho
Madison Schott
07/07/2021, 3:16 PMKevin Kho
Madison Schott
07/07/2021, 3:26 PMKevin Kho