Created
April 3, 2017 21:10
-
-
Save dhuang/61d38fb001c3a917edf4817bb0c915f9 to your computer and use it in GitHub Desktop.
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
from datetime import datetime | |
from airflow.models import DAG | |
from airflow.operators.dummy_operator import DummyOperator | |
from airflow.operators.latest_only_operator import LatestOnlyOperator | |
dag = DAG(dag_id='airflow_719', start_date=datetime(2017, 4, 1), schedule_interval='@hourly', catchup=True) | |
latest_only = LatestOnlyOperator( | |
task_id='latest_only', | |
dag=dag, | |
) | |
dummy1 = DummyOperator( | |
task_id='dummy1', | |
dag=dag, | |
) | |
dummy2 = DummyOperator( | |
task_id='dummy2', | |
dag=dag, | |
) | |
dummy3 = DummyOperator( | |
task_id='dummy3', | |
dag=dag, | |
) | |
latest_only >> dummy1 >> dummy2 >> dummy3 | |
if __name__ == '__main__': | |
dag.cli() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment