新增商铺价格计算

This commit is contained in:
沈健
2025-04-09 17:49:17 +08:00
parent 12f1dcf7cf
commit b61199d0be
5 changed files with 146 additions and 2 deletions
+26
View File
@@ -0,0 +1,26 @@
"""
小区周边配套DAG
"""
from airflow.operators.bash import BashOperator
import pendulum
from airflow import DAG
with DAG(
dag_id="shop_rent_dag",
schedule_interval="0 4 25 * *",
start_date=pendulum.datetime(2025, 4, 10, tz="Asia/Shanghai"),
catchup=True,
description="商铺租金城市区域商圈均价计算"
) as dag:
t1 = BashOperator(
task_id='price',
bash_command='python /opt/airflow/dags/repo/dags/shop/rent/price.py {{dag_run.conf["yearmonth"] if "yearmonth" in dag_run.conf}} ',
)
t2 = BashOperator(
task_id='business',
bash_command='python /opt/airflow/dags/repo/dags/shop/rent/business.py {{dag_run.conf["yearmonth"] if "yearmonth" in dag_run.conf}} ',
)
t1 >> t2