优化参数
This commit is contained in:
@@ -16,7 +16,7 @@ if not os.path.exists(path):
|
||||
city_df = pd.read_excel('/opt/airflow/dags/repo/dags/mt/supply/data/美团19城市列表.xlsx')
|
||||
cities = city_df['城市列表'].values.tolist()
|
||||
|
||||
output_date = sys.argv[1] if sys.argv[1] else dateutils.format_date(datetime.datetime.now(), '%Y%m')
|
||||
output_date = len(sys.argv) > 1 if sys.argv[1] else dateutils.format_date(datetime.datetime.now(), '%Y%m')
|
||||
print("输出日期" + output_date)
|
||||
|
||||
seaweed_df = pd.DataFrame()
|
||||
|
||||
@@ -11,7 +11,7 @@ path = "/home/airflow/data/mt"
|
||||
|
||||
clickhouse_client = ClickHouseClient(database='fangjia_stat')
|
||||
|
||||
output_date = sys.argv[1] if sys.argv[1] else dateutils.format_date(datetime.datetime.now(), '%Y%m')
|
||||
output_date = len(sys.argv) > 1 if sys.argv[1] else dateutils.format_date(datetime.datetime.now(), '%Y%m')
|
||||
print("输出日期" + output_date)
|
||||
|
||||
result_df = pd.read_csv(path + '/FJW_COMM_' + output_date + ".csv", sep='@', encoding='utf-8')
|
||||
|
||||
@@ -17,7 +17,7 @@ cities = city_df['城市列表'].values.tolist()
|
||||
|
||||
path = "/home/airflow/data/mt"
|
||||
|
||||
output_date = sys.argv[1] if sys.argv[1] else dateutils.format_date(datetime.datetime.now(), '%Y%m')
|
||||
output_date = len(sys.argv) > 1 if sys.argv[1] else dateutils.format_date(datetime.datetime.now(), '%Y%m')
|
||||
|
||||
month_start = dateutils.format_date(dateutils.add_months(dateutils.parse_date(output_date, '%Y%m'), months=-1), '%Y%m') + '01'
|
||||
curr_month_start = output_date + '01'
|
||||
|
||||
@@ -14,7 +14,7 @@ cities = city_df['城市列表'].values.tolist()
|
||||
|
||||
path = "/home/airflow/data/mt"
|
||||
|
||||
output_date = sys.argv[1] if sys.argv[1] else dateutils.format_date(datetime.datetime.now(), '%Y%m')
|
||||
output_date = len(sys.argv) > 1 if sys.argv[1] else dateutils.format_date(datetime.datetime.now(), '%Y%m')
|
||||
|
||||
month_start = dateutils.format_date(dateutils.add_months(dateutils.parse_date(output_date, '%Y%m'), months=-1), '%Y%m') + '01'
|
||||
curr_month_start = output_date + '01'
|
||||
|
||||
@@ -17,7 +17,7 @@ cities = city_df['城市列表'].values.tolist()
|
||||
|
||||
path = "/home/airflow/data/mt"
|
||||
|
||||
output_date = sys.argv[1] if sys.argv[1] else dateutils.format_date(datetime.datetime.now(), '%Y%m')
|
||||
output_date = len(sys.argv) > 1 if sys.argv[1] else dateutils.format_date(datetime.datetime.now(), '%Y%m')
|
||||
|
||||
seaweed_new_result_df = pd.read_csv(path + '/FJW_COMM_' + output_date + '.csv', sep='@', encoding='utf-8')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user