Commit 7490b842 by fangxingjun

no message

parent 35da7e22
...@@ -25,12 +25,16 @@ def export_data(site_name, date_type, date_info): ...@@ -25,12 +25,16 @@ def export_data(site_name, date_type, date_info):
cols_list = ['asin', 'asin_is_variation', 'volume', 'weight_str', 'date_info'] cols_list = ['asin', 'asin_is_variation', 'volume', 'weight_str', 'date_info']
import_table = f'{site_name}_all_syn_st_{date_type}_{date_info.replace("-", "_")}' import_table = f'{site_name}_all_syn_st_{date_type}_{date_info.replace("-", "_")}'
if date_type == 'day': if date_type in ['day', 'week']:
sql_truncate = f"truncate {import_table};" sql_truncate = f"truncate {import_table};"
print(f"sql_truncate: {sql_truncate}") print(f"sql_truncate: {sql_truncate}")
engine.execute(sql_truncate) engine.execute(sql_truncate)
hive_table = 'dwt_asin_sync' hive_table = 'dwt_asin_sync'
if date_type == 'week':
cols_list = ['asin', 'date_info']
hive_table = 'ods_keepa_finder_asin'
print(f"import_table: {import_table}, hive_table: {hive_table}") print(f"import_table: {import_table}, hive_table: {hive_table}")
print(f"partitions: {partitions}") print(f"partitions: {partitions}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment