Commit b81746a9 authored by 王志伟's avatar 王志伟

统计用户消费金额及占比曲线

parent 59964e3a
...@@ -425,6 +425,15 @@ object meigou_xiaofei_renshu { ...@@ -425,6 +425,15 @@ object meigou_xiaofei_renshu {
ti.tidbMapTable(dbName = "jerry_prod", tableName = "merge_queue_table") ti.tidbMapTable(dbName = "jerry_prod", tableName = "merge_queue_table")
sc.sparkContext.addJar("hdfs:///user/hive/share/lib/udf/daybits-1.0.0-SNAPSHOT.jar")
sc.sparkContext.addJar("hdfs:///user/hive/share/lib/udf/hive-udf-1.0-SNAPSHOT.jar")
sc.sql("CREATE TEMPORARY FUNCTION dayBitsGetW1 AS 'com.gmei.data.daybits.udf.DayBitsGets$W1'")
sc.sql("SELECT order_id FROM mining.ml_order_spam_recognize WHERE partition_date='${partition_date}' AND self_support=0 AND dayBitsGetW1(predict_result,'${partition_date}')=0").show()
import sc.implicits._ import sc.implicits._
val stat_date = GmeiConfig.getMinusNDate(1) val stat_date = GmeiConfig.getMinusNDate(1)
//println(param.date) //println(param.date)
...@@ -506,9 +515,9 @@ object meigou_xiaofei_renshu { ...@@ -506,9 +515,9 @@ object meigou_xiaofei_renshu {
|order by sum(md.gengmei_price) |order by sum(md.gengmei_price)
""".stripMargin """.stripMargin
) )
meigou_price.show(80) // meigou_price.show(80)
GmeiConfig.writeToJDBCTable(meigou_price, "meigou_price", SaveMode.Overwrite) // GmeiConfig.writeToJDBCTable(meigou_price, "meigou_price", SaveMode.Overwrite)
} }
......
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