a working example: {{ts}} is the execution date

general_templated_cmd = """
<your command> {{ ts }} {{ task.task_id }} {{ dag.dag_id }}
"""

t1 = BashOperator(
    task_id='morning_task',
    bash_command=general_templated_cmd,
    dag=dag)

On Wed, May 25, 2016 at 8:39 AM, Lance Norskog <[email protected]>
wrote:

> My mad google skillz are failing me. Where is an example of getting the
> execution date into the python code in a DAG?
>
> I can't quite tell how to trigger the ninja template engine. Is there an
> example somewhere of this?
>
> --
> Lance Norskog
> [email protected]
> Redwood City, CA
>

Reply via email to