You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Sumit Maheshwari (JIRA)" <ji...@apache.org> on 2016/08/17 11:06:21 UTC
[jira] [Created] (AIRFLOW-436) Incorrect templating when used with
.format
Sumit Maheshwari created AIRFLOW-436:
----------------------------------------
Summary: Incorrect templating when used with .format
Key: AIRFLOW-436
URL: https://issues.apache.org/jira/browse/AIRFLOW-436
Project: Apache Airflow
Issue Type: Bug
Reporter: Sumit Maheshwari
Found that when {{.format}} is used in a templatable field, it produces weird results. For example:
{code:none}
t3 = BashOperator(
task_id='wget',
bash_command="wget {0}/{{ ds }}".format('google.com'),
dag=dag)
{code}
produces following result:
{code:none}
{bash_operator.py:79} INFO - Running command: wget google.com/{ ds }
{code}
But if we change {{bash_command}} to following, it works as expected:
{code:none}
bash_command="wget %s/{{ ds }}"%('google.com')
{code}
{code:none}
{bash_operator.py:79} INFO - Running command: wget google.com/2016-08-05
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)