修改目录
This commit is contained in:
@@ -11,10 +11,10 @@ with DAG(
|
|||||||
) as dag:
|
) as dag:
|
||||||
t1 = BashOperator(
|
t1 = BashOperator(
|
||||||
task_id='district_count_thirdavg_deal',
|
task_id='district_count_thirdavg_deal',
|
||||||
bash_command='python /opt/airflow/dags/repo/dags/stat/district_count_thirdavg_deal.py',
|
bash_command='python /opt/airflow/dags/repo/dags/stat/evaluate/district_count_thirdavg_deal.py',
|
||||||
)
|
)
|
||||||
t2 = BashOperator(
|
t2 = BashOperator(
|
||||||
task_id='district_sell_property',
|
task_id='district_sell_property',
|
||||||
bash_command='python /opt/airflow/dags/repo/dags/stat/district_sell_property.py',
|
bash_command='python /opt/airflow/dags/repo/dags/stat/evaluate/district_sell_property.py',
|
||||||
)
|
)
|
||||||
t1 >> t2
|
t1 >> t2
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
统计小区数量、近半年第三方均价、近半年成交信息
|
统计小区数量、近半年第三方均价、近半年成交信息
|
||||||
"""
|
"""
|
||||||
@@ -6,12 +5,16 @@ import logging
|
|||||||
from goojia_utils import MAIN_MONGO_CLIENT, ElasticSearchClient, dateutils
|
from goojia_utils import MAIN_MONGO_CLIENT, ElasticSearchClient, dateutils
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import datetime
|
import datetime
|
||||||
|
import os
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
df = pd.read_excel('/opt/airflow/dags/repo/dags/stat/evaluate/data/估值数据统计.xlsx')
|
df = pd.read_excel('/opt/airflow/dags/repo/dags/stat/evaluate/data/估值数据统计.xlsx')
|
||||||
year_month_day = dateutils.format_date(datetime.datetime.now())
|
year_month_day = dateutils.format_date(datetime.datetime.now())
|
||||||
aim_file_name = '/opt/airflow/dags/repo/dags/stat/evaluate/data/估值数据统计结果' + year_month_day + '.xlsx'
|
path = "/home/airflow/data/evaluate"
|
||||||
|
aim_file_name = path + '/估值数据统计结果' + year_month_day + '.xlsx'
|
||||||
|
if not os.path.exists(path):
|
||||||
|
os.makedirs(path)
|
||||||
|
|
||||||
seaweed_conn = MAIN_MONGO_CLIENT.get_collection('fangjia', 'seaweed')
|
seaweed_conn = MAIN_MONGO_CLIENT.get_collection('fangjia', 'seaweed')
|
||||||
es206_client = ElasticSearchClient(host='192.168.0.206')
|
es206_client = ElasticSearchClient(host='192.168.0.206')
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import datetime
|
|||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
year_month_day = dateutils.format_date(datetime.datetime.now())
|
year_month_day = dateutils.format_date(datetime.datetime.now())
|
||||||
aim_file_name = '/opt/airflow/dags/repo/dags/stat/evaluate/data/估值数据统计结果' + year_month_day + '.xlsx'
|
aim_file_name = '/home/airflow/data/evaluate/估值数据统计结果' + year_month_day + '.xlsx'
|
||||||
start_time = dateutils.format_date(dateutils.add_months(dateutils.datetime.datetime.now(), days=-181))
|
start_time = dateutils.format_date(dateutils.add_months(dateutils.datetime.datetime.now(), days=-181))
|
||||||
one_year_time = dateutils.format_date(dateutils.add_months(dateutils.datetime.datetime.now(), days=-366))
|
one_year_time = dateutils.format_date(dateutils.add_months(dateutils.datetime.datetime.now(), days=-366))
|
||||||
|
|
||||||
@@ -19,7 +19,6 @@ es206_client = ElasticSearchClient(host='192.168.0.206')
|
|||||||
seaweed_df = pd.DataFrame(list(seaweed_conn.find({'cat': 'district', 'status': 0}, {'city': 1, 'region': 1, 'name': 1, 'alias': 1})
|
seaweed_df = pd.DataFrame(list(seaweed_conn.find({'cat': 'district', 'status': 0}, {'city': 1, 'region': 1, 'name': 1, 'alias': 1})
|
||||||
.batch_size(10000)))
|
.batch_size(10000)))
|
||||||
|
|
||||||
|
|
||||||
def sell_stat():
|
def sell_stat():
|
||||||
"""
|
"""
|
||||||
最近一年有样本小区占比 最近3月有样本小区占比
|
最近一年有样本小区占比 最近3月有样本小区占比
|
||||||
|
|||||||
Reference in New Issue
Block a user