Commit 42366fa6 authored by litaolemo's avatar litaolemo

update

parent 164a6a7d
...@@ -93,14 +93,9 @@ spark.sql("CREATE TEMPORARY FUNCTION arrayMerge AS 'com.gmei.hive.common.udf.UDF ...@@ -93,14 +93,9 @@ spark.sql("CREATE TEMPORARY FUNCTION arrayMerge AS 'com.gmei.hive.common.udf.UDF
# huidu_device_id_df = spark.sql(huidu_device_id_sql) # huidu_device_id_df = spark.sql(huidu_device_id_sql)
# huidu_device_id_df.createOrReplaceTempView("dev_view") # huidu_device_id_df.createOrReplaceTempView("dev_view")
sql_search_ctr = r""" sql_search_ctr = r"""
SELECT query
, coalesce(t3.all_search_uv, 0) as all_search_uv --全部搜索uv
, coalesce(t3.all_search_pv, 0) as all_search_pv --全部搜索pv
, t3.partition_date
FROM (
--搜索pvuv --搜索pvuv
SELECT query SELECT
, click.partition_date as partition_date click.partition_date as partition_date
, count(click.cl_id) as all_search_pv , count(click.cl_id) as all_search_pv
, count(distinct click.cl_id) as all_search_uv , count(distinct click.cl_id) as all_search_uv
FROM ( FROM (
...@@ -197,8 +192,8 @@ FROM ( ...@@ -197,8 +192,8 @@ FROM (
AND params['card_type'] = 'highlight_word' AND params['card_type'] = 'highlight_word'
) click ) click
GROUP BY click.partition_date, query GROUP BY click.partition_date
) t3 order by all_search_uv asc
""".format(start_date='20201116',end_date='20201117') """.format(start_date='20201116',end_date='20201117')
......
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