DAG: eod_import_terminal_trades eod import terminal trades dag

schedule: 0 0 * * *


eod_import_terminal_trades

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -*- coding: utf-8 -*-

from airflow import DAG
from airflow.operators.python_operator import PythonOperator

from eod_pd import *

# -------------------------------------------------------------------------------
# dag
# these args will get passed on to each operator
default_args = {
    'owner': 'TongYu',
    'catchup': False,
    'start_date': utils.trans_utc_datetime('0:00:00'),
}
dag = DAG(
    'eod_import_terminal_trades',
    catchup=False,
    default_args=default_args,
    schedule_interval='0 0 * * *',
    dagrun_timeout=timedelta(minutes=15),
    description='eod import terminal trades dag')
# -------------------------------------------------------------------------------


eod_import_terminal_trades_operator = PythonOperator(
    task_id='eod_import_terminal_trades_task',
    python_callable=import_terminal_trades,
    execution_timeout=timedelta(minutes=5),
    dag=dag)