Skip to content

Instantly share code, notes, and snippets.

@tameem92
Created April 18, 2021 03:29
Show Gist options
  • Save tameem92/1e2eab3dbaa8693715bd4a2e36c94bb1 to your computer and use it in GitHub Desktop.
Save tameem92/1e2eab3dbaa8693715bd4a2e36c94bb1 to your computer and use it in GitHub Desktop.
from airflow.models import Variable
# Fetch your basic airflow variables
# These are loaded by CI/CD or could be from a backend like secret manager
# in AWS or Google Cloud
environment = Variable.get('environment', deserialize_json=True)
controller = Variable.get('controller', deserialize_json=True)
# Fetch dynamic configs from some API (whatever you use)
dynamic_config = config_api.fetch_config()
process_invoices = dynamic_config['process_invoices']
process_messages = dynamic_config['process_messages']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment