新增出售均价算法
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
"""
|
||||||
|
写字楼基准价计算
|
||||||
|
"""
|
||||||
|
from airflow.operators.bash import BashOperator
|
||||||
|
|
||||||
|
import pendulum
|
||||||
|
|
||||||
|
from airflow import DAG
|
||||||
|
|
||||||
|
with DAG(
|
||||||
|
dag_id="office_sell_base_price_dag",
|
||||||
|
schedule_interval="0 1 26 * *",
|
||||||
|
start_date=pendulum.datetime(2024, 3, 24, tz="Asia/Shanghai"),
|
||||||
|
catchup=True,
|
||||||
|
description="写字楼出售基准价计算"
|
||||||
|
) as dag:
|
||||||
|
t1 = BashOperator(
|
||||||
|
task_id='sell_base_price',
|
||||||
|
bash_command='python /opt/airflow/dags/repo/dags/office/sell/base_price.py {{dag_run.conf["yearmonth"] if "yearmonth" in dag_run.conf}}',
|
||||||
|
)
|
||||||
|
t1
|
||||||
|
|
||||||
@@ -337,17 +337,17 @@ def calc(city, year_month):
|
|||||||
actions.clear()
|
actions.clear()
|
||||||
|
|
||||||
yearmonth = sys.argv[1] if len(sys.argv) > 1 else None
|
yearmonth = sys.argv[1] if len(sys.argv) > 1 else None
|
||||||
# for yearmonth in [
|
for yearmonth in [
|
||||||
# "202406",
|
"202406",
|
||||||
# "202407",
|
"202407",
|
||||||
# "202408",
|
"202408",
|
||||||
# "202409",
|
"202409",
|
||||||
# "202410",
|
"202410",
|
||||||
# "202411",
|
"202411",
|
||||||
# "202412",
|
"202412",
|
||||||
# "202501"
|
"202501"
|
||||||
# ]:
|
]:
|
||||||
# calc(None, yearmonth)
|
calc(None, yearmonth)
|
||||||
calc("广州", yearmonth)
|
# # calc("广州", yearmonth)
|
||||||
calc("武汉", yearmonth)
|
# # calc("武汉", yearmonth)
|
||||||
calc("深圳", yearmonth)
|
# calc("深圳", yearmonth)
|
||||||
Reference in New Issue
Block a user