Sean Talia
09/01/2021, 6:37 PMdbt
projects) that multiple teams at my org use. The individual teams will set up an orchestrator flow that has one task (the StartFlowRun
task), and they'll pass in the various parameters that they need to pass in so that their specific dbt
project will run. They also will directly attach state handlers that they configure to their StartFlowRun
task within their orchestrator flow. Of course, in order for the status of the underlying template flow to bubble up to the orchestrator flow, we have to set wait=True
on that flow.
The issue with this setup is that it unnecessarily eats up our flow concurrency, since this setup always leads to at least 2 flows running at a given time. We don't really need the orchestrator flow to wait around; we're only keeping it waiting as a means to capture the template flow's status, which then gets passed along to the custom state handler that the respective team within our org has configured.Sean Talia
09/01/2021, 6:40 PMdbt
, I just mentioned it here to make the use case a little more concrete.Kevin Kho
Sean Talia
09/01/2021, 7:24 PMSean Talia
09/01/2021, 7:25 PMprefect.context
object itself?Kevin Kho
prefect.context.get("parameters")
and this returns a dict of parameters inside the state handler.Kevin Kho
Sean Talia
09/01/2021, 7:27 PMKevin Kho
task_run_count