Last active
January 31, 2019 22:50
-
-
Save CharlesAHunt/9602ebe631d853a745b494d5c9f53fd9 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 airflow.operators.python_operator import PythonOperator | |
from airflow import DAG | |
from datetime import datetime, timedelta | |
default_args = { | |
'owner': 'airflow', | |
'depends_on_past': False, | |
'start_date': datetime(2019, 1, 1), | |
'email': ['support@tg.com'], | |
'email_on_failure': True, | |
'email_on_retry': False, | |
'retries': 1, | |
'retry_delay': timedelta(minutes=5), | |
# 'queue': 'bash_queue', | |
# 'pool': 'backfill', | |
# 'priority_weight': 10, | |
# 'end_date': datetime(2016, 1, 1), | |
} | |
dag = DAG('test', default_args=default_args, schedule_interval=timedelta(days=1)) | |
def test(ds, **kwargs): | |
print("TESTING") | |
return 'Notify job complete' | |
PythonOperator( | |
task_id='test', | |
provide_context=True, | |
python_callable=test, | |
dag=dag, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment