Last active
June 6, 2021 19:27
-
-
Save nickefy/20e9ed1ee30fad18bae53d65aa52203b to your computer and use it in GitHub Desktop.
Airflow DAG without framework
This file contains hidden or 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 timedelta | |
from airflow.models import DAG | |
from airflow.operators.bash_operator import BashOperator | |
from airflow.utils.dates import days_ago | |
from airflow.operators.print_text_old import PrintText | |
text_to_print_dag = 'Hello World!' | |
args = { | |
'owner': 'Airflow', | |
'start_date': '2021-01-01', | |
'retries': 1, | |
} | |
dag = DAG( | |
dag_id='HELLO WORLD', | |
default_args=args, | |
schedule_interval='@daily', | |
dagrun_timeout=timedelta(minutes=5), | |
catchup=False, | |
) | |
run_this = PrintText( | |
task_id='Print Hello World', | |
text_to_print=text_to_print_dag, | |
) | |
run_this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment