Files
airflow/dags/office/dag_office_sell.py
T
2025-03-31 15:56:28 +08:00

26 lines
776 B
Python

from airflow.operators.bash import BashOperator
import pendulum
from airflow import DAG
with DAG(
dag_id="office_sell_dag",
# 每月24日1点运行
schedule_interval="0 3 27 * *",
start_date=pendulum.datetime(2025, 3, 26, tz="Asia/Shanghai"),
catchup=True,
description="写字楼出售城市区域均价价格计算"
) as dag:
t1 = BashOperator(
task_id='office_sell',
bash_command='python /opt/airflow/dags/repo/dags/office/sell/price.py {{dag_run.conf["yearmonth"] if "yearmonth" in dag_run.conf}} ',
)
t2 = BashOperator(
task_id='fill_price',
bash_command='python /opt/airflow/dags/repo/dags/office/sell/fill_price.py {{dag_run.conf["yearmonth"] if "yearmonth" in dag_run.conf}}',
)
t1 >> t2