Commit 2f90bd66 authored by litaolemo's avatar litaolemo

update

parent 5509785f
......@@ -72,7 +72,8 @@ spark.sql("CREATE TEMPORARY FUNCTION json_map AS 'brickhouse.udf.json.JsonMapUDF
spark.sql("CREATE TEMPORARY FUNCTION is_json AS 'com.gmei.hive.common.udf.UDFJsonFormatCheck'")
spark.sql("CREATE TEMPORARY FUNCTION arrayMerge AS 'com.gmei.hive.common.udf.UDFArryMerge'")
select_sql = """SELECT * FROM pm.tl_pm_contentpage_ctr"""
select_sql = """SELECT *,NVL(ROUND(wel_click_pv/wel_exp_pv,5)),0) as meigou_ctr,
NVL(ROUND(content_click_pv/content_exp_pv,5),0) as neirong_ctr FROM pm.tl_pm_contentpage_ctr"""
device_df = spark.sql(select_sql)
device_df.show(1, False)
sql_res = device_df.collect()
......
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