← ...
project 8: the dynamic dag factory
project 8: the “dynamic dag” factory
scenario: you have 50 different api endpoints to ingest. creating 50 python files is unmaintainable. the mission: write one python script that generates 50 airflow dags dynamically.
- tech: apache airflow.
- challenge: understanding python metaprogramming and airflow parsing.
- dev to prod:
- create a configuration file (yaml) listing 5 apis (e.g., weather, crypto, stocks).
- write a
dag_generator.pythat loops through the yaml and creates a dag for each. - prod requirement: ensure the airflow scheduler doesn’t crash due to parsing load.