Skip to content

Commit

Permalink
Added example for defaults in conn.extras (#35165)
Browse files Browse the repository at this point in the history
Added example for providing a default value when reading extras from connections using extra_dejson.get

(cherry picked from commit 7c80b2b)
  • Loading branch information
vedrankolka authored and ephraimbuddy committed Oct 30, 2023
1 parent 49ecb5a commit c7c0df8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/apache-airflow/templates-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,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
-------
Expand Down

0 comments on commit c7c0df8

Please sign in to comment.