Templating for Airflow connections
Project description
Templating for Airflow connections
The connection plugin contains an Airflow macro for templating connections in tasks. You can use it like this:
{{ macros.connection_plugin.get_conn('airflow_db').host }}
connection_plugin.get_conn
returns the Connection object
that you can interact with like it is described in the documentation.
Installation
pip install airflow-connection-plugin
Demo
To start the docker container simply run the following command in the root directory:
cd example && docker-compose up
After that you can reach the airflow frontend via http://localhost:8080. You will find an example DAG that demonstrates how to retrieve different connection information.
Attention: Be especially careful when using passwords in templates.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for airflow-connection-plugin-1.0.0rc5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8bf1378fc70c51fa811816e9fc7aa2765d5599c03a339edcd5382e16b0a0184 |
|
MD5 | 3b2ad76136d9fe2803cc2a65ed356bee |
|
BLAKE2b-256 | 1b22f75b72d27aa2529fb0ad5d446d3821568827d288fa4994ae1d16d2397b32 |