优化
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user