27 lines
769 B
Python
27 lines
769 B
Python
"""
|
|
小区周边配套DAG
|
|
"""
|
|
from airflow.providers.standard.operators.bash import BashOperator
|
|
|
|
import pendulum
|
|
|
|
from airflow import DAG
|
|
|
|
with DAG(
|
|
dag_id="shop_rent_dag",
|
|
schedule="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
|
|
|