Creating a simple Dag
You've spent some time reviewing the Airflow components and are interested in testing out your own workflows. To start, you decide to define the default parameters and create a Dag object for your workflow.
The datetime object has been imported for you.
Diese Übung ist Teil des Kurses
<Kurs>Einführung in Apache Airflow mit Python</Kurs>Übungsanweisungen
- Import the Airflow Dag object; note that it is case-sensitive.
- Define the Dag decorator and name the Dag
example_etl. - Run the Dag function at the end of the code file.
Interaktive praktische Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Import the dag object
from ____ import dag
# Define the Dag attributes
____(
____='example_etl',
start_date=datetime(2026, 3, 1),
)
def example_etl():
pass
# Run the Dag
____()