Created
November 18, 2020 17:24
-
-
Save turbaszek/38b494126f1b3ab0a2784b3a1c209ab6 to your computer and use it in GitHub Desktop.
Sample big dag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from airflow.operators.dummy_operator import DummyOperator | |
from airflow.models import DAG | |
from airflow.utils.dates import days_ago | |
with DAG( | |
"big_dag", | |
start_date=days_ago(1), | |
schedule_interval=None, | |
) as dag: | |
start = DummyOperator(task_id="start") | |
end = DummyOperator(task_id="end") | |
for i in range(20): | |
first = DummyOperator(task_id=f"next_{i}") | |
start >> first | |
for j in range(random.randint(5, 15)): | |
next = DummyOperator(task_id=f"next_{i}_{j}") | |
first >> next | |
first = next | |
next >> end |
thank you for your time and for give me the opportunity to learn
this is awesome, thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@LaurianoElmiroDuarte this is a screen shot from Apache Airflow DAG view