Manual Triggers and Parameters in Airflow
📖 Scenario: You are managing data workflows using Apache Airflow. Sometimes you want to run a workflow manually and pass specific information to control its behavior.For example, you want to run a data processing task manually and tell it which data source to use.
🎯 Goal: Build a simple Airflow DAG that can be triggered manually with a parameter called source. The DAG will print the value of this parameter.
📋 What You'll Learn
Create a DAG with the id
manual_trigger_dagAdd a
source parameter to the DAG's run configurationUse a PythonOperator to print the
source parameter valueEnsure the DAG can be triggered manually with the parameter
💡 Why This Matters
🌍 Real World
In real projects, manual triggers with parameters let you run workflows on demand with custom inputs, like processing specific files or dates.
💼 Career
Understanding manual triggers and parameters is essential for DevOps engineers and data engineers managing workflows in Airflow.
Progress0 / 4 steps