Commit deb277df authored by litaolemo's avatar litaolemo

update

parent 55a96b27
...@@ -75,8 +75,8 @@ spark.sql("CREATE TEMPORARY FUNCTION arrayMerge AS 'com.gmei.hive.common.udf.UDF ...@@ -75,8 +75,8 @@ spark.sql("CREATE TEMPORARY FUNCTION arrayMerge AS 'com.gmei.hive.common.udf.UDF
task_list = [] task_list = []
task_days = 1 task_days = 2
for t in range(0, task_days): for t in range(1, task_days):
day_num = 0 - t day_num = 0 - t
now = (datetime.datetime.now() + datetime.timedelta(days=day_num)) now = (datetime.datetime.now() + datetime.timedelta(days=day_num))
last_30_day_str = (now + datetime.timedelta(days=-30)).strftime("%Y%m%d") last_30_day_str = (now + datetime.timedelta(days=-30)).strftime("%Y%m%d")
...@@ -234,7 +234,7 @@ left join ...@@ -234,7 +234,7 @@ left join
and (dev_view.device_id is null or dev_view.device_id='') and (dev_view.device_id is null or dev_view.device_id='')
GROUP by D.DEVICE_OS_TYPE, GROUP by D.DEVICE_OS_TYPE,
D.ACTIVE_TYPE D.ACTIVE_TYPE
""".format(partition_day=yesterday_str) """.format(partition_day=yesterday_str,)
print(sql_search_ctr) print(sql_search_ctr)
search_ctr_df = spark.sql(sql_search_ctr) search_ctr_df = spark.sql(sql_search_ctr)
......
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