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.0rc2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5bfc88e450b245464cb3522aea62999bf31271a8e753952b60ec615c1d53461 |
|
MD5 | 8d5a00b3a39ea9da78a491fb4af90d11 |
|
BLAKE2b-256 | 3eabc82008c25e2e710cfb3c6c569813b9b9715a363447bdf9142e7127a43e83 |