Files
airflow/dags/stat/dag_district_sell_deal.py
T
2023-03-17 21:01:37 +08:00

21 lines
764 B
Python

from airflow.operators.bash import BashOperator
import pendulum
from airflow import DAG
with DAG(
"district_sell_deal_dag",
# 每周五运行
schedule_interval="0 1 * * 5",
start_date=pendulum.datetime(2023, 3, 17, tz="Asia/Shanghai"),
catchup=True,
) as dag:
t1 = BashOperator(
task_id='district_count_thirdavg_deal',
bash_command='python /opt/airflow/dags/repo/dags/stat/evaluate/district_count_thirdavg_deal.py {{dag_run.conf["city_num"] if "city_num" in dag_run.conf}}',
)
t2 = BashOperator(
task_id='district_sell_property',
bash_command='python /opt/airflow/dags/repo/dags/stat/evaluate/district_sell_property.py {{dag_run.conf["sell_num"] if "sell_num" in dag_run.conf}}',
)
t1 >> t2