This commit is contained in:
沈健
2025-06-10 14:04:11 +08:00
parent a09c8b2feb
commit 43e9b5af14
4 changed files with 234 additions and 117 deletions
+5 -4
View File
@@ -1,9 +1,10 @@
"""
写字楼基准价计算
"""
from airflow.operators.bash import BashOperator
from airflow.operators.bash import BashOperator, PythonOperator
import pendulum
from sell.base_price import calc
from airflow import DAG
@@ -14,9 +15,9 @@ with DAG(
catchup=True,
description="写字楼基准价计算"
) as dag:
t1 = BashOperator(
t1 = PythonOperator(
task_id='base_price',
bash_command='python /opt/airflow/dags/repo/dags/office/rent/base_price.py {{dag_run.conf["yearmonth"] if "yearmonth" in dag_run.conf}}',
python_callable=calc,
provide_context=True
)
t1