anandj123/composer-templates

render_template_as_native_obj parameter availability while creating DAG from config.yaml

Opened this issue · 0 comments

We should allow to configure parameter render_template_as_native_obj. It is allowing to convert jinja template variables available in native python objects such as list.

def files_to_bq_list(ti, **context):
        directory = ti.xcom_pull(task_ids="gcs_sensor")
        tmp = directory.pop(0)
        ti.xcom_push('files_to_bq_list', directory) # By default it will be available as string for xcom pull but I need python list.
        directory_name = tmp + "covid_part-*"
        ti.xcom_push('directory_to_sftp_name', directory_name) # This is fine as it is string

Please refer Airflow documentation for more details.