@turbaszek instructed me to bring the discussion from
https://github.com/apache/airflow/issues/14597 into the dev list:

Today is possible to conveniently access airflow's variables
<https://airflow.apache.org/docs/apache-airflow/stable/concepts.html#variables>
in
jinja templates using {{ var.value.<variable_name> }}.
I think it would be nice to have an similar syntax for connections {{
conn.value.myconn }}

Currently if you want to access connections info from the DAG you need to
resort to any of these two workaround

* c = Connection.get_connection_from_secrets('myconn')
* provide a custom macro at the DAG with `user_defined_macros`
* provide a custom macro via a plugin

All of them are less convenient than having a builtin documented jinja
macro for that.

Does  anybody foresee any security issues by having macros for connections?
Or why connections were left out of jinja in the first place (I suspect
that was a conscious decision)?

-- 
/Rubén

Reply via email to