Looks like the author didn't setup any attributes as templated...
https://github.com/apache/incubator-airflow/blob/ff45d8f2218a8da9328161aa66d004c3db3b367e/airflow/contrib/operators/emr_create_job_flow_operator.py#L35

You can do it easily with a simple hack:

class TemplatedEmrCreateJobFlowOperator(EmrCreateJobFlowOperator):
    template_fields = ['job_flow_overrides']

Then you just use that operator instead and templating should work for the
values in job_flow_overrides.

It'd be nice if you also took the time to send a PR adding that line.

Max

On Tue, Jun 20, 2017 at 1:58 AM, Vincent Poulain <
vincent.poul...@tinyclues.com> wrote:

> Hello,
>
> I would like to use EmrCreateJobFlowOperator, using job_flow_overrides
> attribute with dynamic attribute.
>
> Example
>
> EmrCreateJobFlowOperator(job_flow_overrides ={'foo' : '{{ xcom.pull }}'})
>
> job_flow_overrides seems very nested to use jinja templating and
> template_fields
> is set to [].
>
>  Any idea to fetch data from xcom and using it in job_flow_overrides params
> ?
>
> Thank
>
>
> --
>
> *Vincent Poulain*
>
> Senior Software Engineer
>
>
>
> Office +33 1 75 50 67 26 <+33%201%2075%2050%2067%2026> | Mobile +33 6 21
> 82
> 87 62 | vinc...@tinyclues.com <supp...@tinyclues.com>
>
> Tinyclues | 51 rue Étienne Marcel, 75001 Paris
>
> www.tinyclues.com <http://bit.ly/2hNL4Fs> | @tinyclues
> <https://twitter.com/Tinyclues>
>

Reply via email to