DAG: pg_hsm_new

schedule: 00 17 * * *


pg_hsm_new

Toggle wrap
 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
31
32
from airflow.operators.bash_operator import BashOperator
from airflow import DAG
from datetime import datetime, timedelta



args = {
    'owner': 'lidayuan',
    'start_date': datetime(2022, 2, 23),
    'email': 'gaoqiang@lenztechretail.com',
    'email_on_failure': False,
    'email_on_retry': False,
    'retries': 3,
    'retry_delay': timedelta(minutes=1),
}

dag = DAG(
    dag_id='pg_hsm_new',
    default_args=args,
    schedule_interval='00 17 * * *',
    dagrun_timeout=timedelta(minutes=200))




t1=BashOperator(task_id="pg_w_new",bash_command='cd /usr/local/airflow/dags/bi_etl/bi_project_airflow/project_common/;nohup python3 pg_hsm/pg_hsm_w_new4.py &',dag=dag)
t4=BashOperator(task_id="pg_bi_user_action",bash_command='cd /usr/local/airflow/dags/bi_etl/bi_project_airflow/project_common/;nohup python pg_hsm/pg_hsm_user/pg_bi_user_action_v3.py &',dag=dag)
t5=BashOperator(task_id="pg_bi_psku_2q",bash_command='cd /usr/local/airflow/dags/bi_etl/bi_project_airflow/project_common/;nohup python pg_hsm/pg_hsm_psku_months_compared.py &',dag=dag)


t1.set_downstream(t4)
t4.set_downstream(t5)