airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Davydov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AIRFLOW-1241) Allow airflow test and airflow run to take arguments to pass to DAGs
Date Tue, 23 May 2017 22:12:04 GMT
Dan Davydov created AIRFLOW-1241:
------------------------------------

             Summary: Allow airflow test and airflow run to take arguments to pass to DAGs
                 Key: AIRFLOW-1241
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1241
             Project: Apache Airflow
          Issue Type: Improvement
          Components: cli
            Reporter: Dan Davydov


A common use case it to have conditionals in a DAG to run dev/prod code, e.g.

DEV_MODE=True

if DEV_MODE:
  hit_test_db
else:
  hit_prod_db

it would be good if you could instead pass arguments to tasks with airflow run/test e.g. airflow
run some_dag some_task some_date --args foo=1
and then in the dag: something like execution_args.foo could be used (which would have value
1).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message