Commit dca24616 authored by litaolemo's avatar litaolemo

update

parent 0d3edf10
......@@ -91,15 +91,13 @@ for t in range(2, task_days):
yesterday_str_format = (now + datetime.timedelta(days=-1)).strftime("%Y-%m-%d")
one_week_age_str = (now + datetime.timedelta(days=-7)).strftime("%Y%m%d")
new_urser_device_id_sql = r"""
SELECT *
FROM online.bl_hdfs_maidian_updates
SELECT * FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= '{partition_day}'
AND partition_date < '{end_date}'
AND ((action in ('on_click_topic_card','on_click_diary_card','search_result_click_infomation_item')
AND page_name in ('search_result_more','search_result_diary','search_result_post'))
or (action = 'on_click_card' AND params['card_content_type'] in ('answer','diary') AND page_name in ('search_result_more','search_result_diary','search_result_question_answer')))
limit 200
""".format(partition_day="20210101", end_date="20200102",tomorrow_str=tomorrow_str)
""".format(partition_day="20210224", end_date="20210225",tomorrow_str=tomorrow_str)
# print(new_urser_device_id_sql)
new_urser_device_id_df = spark.sql(new_urser_device_id_sql)
......
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