You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Chao-Han Tsai (JIRA)" <ji...@apache.org> on 2018/05/25 21:41:00 UTC
[jira] [Created] (AIRFLOW-2526) params can be overridden through
CLI
Chao-Han Tsai created AIRFLOW-2526:
--------------------------------------
Summary: params can be overridden through CLI
Key: AIRFLOW-2526
URL: https://issues.apache.org/jira/browse/AIRFLOW-2526
Project: Apache Airflow
Issue Type: New Feature
Reporter: Chao-Han Tsai
Assignee: Chao-Han Tsai
The idea is that the values in macros can be overridden through CLI.
Given a dag like this:
{code:java}
dag = DAG('hello_world')
templated_command = """
echo "text = {{ params.text }}"
"""
bash_operator = BashOperator(
task_id='bash_task',
bash_command=templated_command,
dag=dag,
params={"text": "this text should be overridden"}
)
{code}
running
{code:java}
airflow trigger_dag hello_world -c "{"text": "overridden successfully"}"
{code}
should print
{code}
overridden successfully
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)