Introduction to Apache Airflow in Python
Mike Metzger
Data Engineer
To run a specific task from command-line:
airflow tasks test <dag_id> <task_id> <date>
To run a full Dag:
airflow dags trigger --logical-date <date> <dag_id>
@task - Specifies a given python function as an Airflow task@task.bash - Returns the content of a bash command as an Airflow task result@task.branch - A branching operator to provide run-time choice within a DagFileSensor - requires filepath argument and might need mode or poke_interval attributesfrom airflow.sdk import dag, task)help(<Airflow object>), ie, help(task)



Introduction to Apache Airflow in Python