You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2018/09/02 18:03:03 UTC

[jira] [Commented] (AIRFLOW-2526) params can be overridden through CLI

    [ https://issues.apache.org/jira/browse/AIRFLOW-2526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16601461#comment-16601461 ] 

Apache Spark commented on AIRFLOW-2526:
---------------------------------------

User 'milton0825' has created a pull request for this issue:
https://github.com/apache/incubator-airflow/pull/3422

> 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
>            Priority: Major
>
> 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)