airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Payton (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AIRFLOW-2415) Airflow Operators are unable to support integers in templatized fields
Date Thu, 03 May 2018 20:57:00 GMT

     [ https://issues.apache.org/jira/browse/AIRFLOW-2415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Max Payton updated AIRFLOW-2415:
--------------------------------
    Description: 
Currently, if you have an operator with a template fields argument that is a dictionary, e.g.:

{{template_fields = ([dict_args])}}

And you populate that dictionary with a field that an integer in a DAG, e.g.:

{{...}}
 dict_args = \{'ds': '{{ ds }}', num_times: 5}
  ...

Then airflow will give you the following error:
{{
&#123;base_task_runner.py:95&#125;
INFO - Subtask: airflow.exceptions.AirflowException: Type '<type 'int'>' used for parameter
'dict_args[num_times]' is not supported for templating}}

  was:
Currently, if you have an operator with a template fields argument that is a dictionary, e.g.:

{{template_fields = ([dict_args])}}

And you populate that dictionary with a field that an integer in a DAG, e.g.:

{{...}}
 dict_args = \{'ds': '{{ ds }}', num_times: 5}
  ...

Then airflow will give you the following error:

 

{{&#123;base_task_runner.py:95&#125;
INFO - Subtask: airflow.exceptions.AirflowException: Type '<type 'int'>' used for parameter
'dict_args[num_times]' is not supported for templating}}


> Airflow Operators are unable to support integers in templatized fields
> ----------------------------------------------------------------------
>
>                 Key: AIRFLOW-2415
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2415
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: Airflow 2.0, Airflow 1.8
>            Reporter: Max Payton
>            Priority: Minor
>
> Currently, if you have an operator with a template fields argument that is a dictionary,
e.g.:
> {{template_fields = ([dict_args])}}
> And you populate that dictionary with a field that an integer in a DAG, e.g.:
> {{...}}
>  dict_args = \{'ds': '{{ ds }}', num_times: 5}
>   ...
> Then airflow will give you the following error:
> {{
> &#123;base_task_runner.py:95&#125;
> INFO - Subtask: airflow.exceptions.AirflowException: Type '<type 'int'>' used for
parameter 'dict_args[num_times]' is not supported for templating}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message