Hi, I have a flow that I want to trigger based on...
# ask-metaflow
r
Hi, I have a flow that I want to trigger based on other flows using
@trigger_on_finish
. The flows that I want to base the trigger on can change so I would like to specify the flow using a command line argument (or some other way of supplying arguments). Basically I want to do something like this
Copy code
parser = parser = argparse.ArgumentParser()
parser.add_argument("--flow")
args = parser.parse_args()

@trigger_on_finish(flow=args.flow)
class MyFlow(FlowSpec):
    @step
    def some_step(self)
I am deploying the pipelines to Airflow so I don't think I can use
Runner
to specify these arguments. When trying to run
python my_flow.py --flow flow_one airflow create my_dag.py
I get
error: unrecognized arguments: airflow create my_dag.py
Is there a way to specify arguments to flow decorators from outside of the python script?
1
h
r
Ah perfect! Thank you!