I use the Airflow CLI heavily. Currently, my python automation uses the test command in order to execute tasks. I would like to pass parameters as JSON dicts via airflow test my_dag my_first_task <date>. For example, via airflow test my_dag my_first_task <date> -tp '{"foo":"bar"}', so that my Airflow task can access it!
To give a real-world example, we currently run airflow DAG to load data for all of our customer organizations. However, we use the CLI to reload particular orgs - we need a means to pass a list of organization_ids to the task from our reload_data.py script, a script that calls airflow via the CLI.
I use the Airflow CLI heavily. Currently, my python automation uses the
testcommand in order to execute tasks. I would like to pass parameters as JSON dicts viaairflow test my_dag my_first_task <date>. For example, viaairflow test my_dag my_first_task <date> -tp '{"foo":"bar"}', so that my Airflow task can access it!To give a real-world example, we currently run airflow DAG to load data for all of our customer organizations. However, we use the CLI to reload particular orgs - we need a means to pass a list of organization_ids to the task from our
reload_data.pyscript, a script that calls airflow via the CLI.