Commit 430a71d5 authored by 高雅喆's avatar 高雅喆

nd data input test

parent 6e9d593f
...@@ -223,6 +223,20 @@ object NdDataInput { ...@@ -223,6 +223,20 @@ object NdDataInput {
tidb_inupt.show() tidb_inupt.show()
println(tidb_inupt.count()) println(tidb_inupt.count())
val yesteday = GmeiConfig.getMinusNDate(1).replace("-","")
val result01 = sc.sql(
s"""
|select a.sid as sid, a.cid as cid, b.tag_id as ctag_id, c.level1_id as clevel1_id
|from tmp1 a
|left join online.tl_hdfs_diary_tags_view b on a.cid=b.diary_id
|left join online.tl_meigou_servicetag_view c on b.tag_id=c.id
|where b.partition_date='${yesteday}'
|and c.partition_date='${yesteday}'
""".stripMargin
)
result01.createOrReplaceTempView("tmp2")
result01.show()
println(result01.count())
} }
......
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