This is an automated email from the ASF dual-hosted git repository.
eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 7c80b2b6fb Added example for defaults in conn.extras (#35165)
7c80b2b6fb is described below
commit 7c80b2b6fbe8391857a81ea03ae24a0f37f8cb7c
Author: Vedran Kolka <[email protected]>
AuthorDate: Sun Oct 29 08:00:08 2023 +0100
Added example for defaults in conn.extras (#35165)
Added example for providing a default value when reading extras from
connections using extra_dejson.get
---
docs/apache-airflow/templates-ref.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/apache-airflow/templates-ref.rst
b/docs/apache-airflow/templates-ref.rst
index 515746211b..77a8475a0f 100644
--- a/docs/apache-airflow/templates-ref.rst
+++ b/docs/apache-airflow/templates-ref.rst
@@ -148,6 +148,7 @@ Just like with ``var`` it's possible to fetch a connection
by string (e.g. ``{{
Additionally, the ``extras`` field of a connection can be fetched as a Python
Dictionary with the ``extra_dejson`` field, e.g.
``conn.my_aws_conn_id.extra_dejson.region_name`` would fetch ``region_name``
out of ``extras``.
+This way, defaults in ``extras`` can be provided as well (e.g. ``{{
conn.my_aws_conn_id.extra_dejson.get('region_name', 'Europe (Frankfurt)') }}``).
Filters
-------