xufei 3 年 前
コミット
efb7673df8

+ 4 - 4
src/main/scala/com/winhc/bigdata/spark/ng/relation/inc_company_relation_v2.scala

@@ -171,12 +171,12 @@ case class inc_company_relation_v2(s: SparkSession,
     sql(
       s"""
          |INSERT INTO TABLE $inc_ads_company_human_relation PARTITION(ds= '$ds')
-         |SELECT  md5(CONCAT_WS('_',company_id,human_pid)) as rowkey
+         |SELECT  md5(CONCAT_WS('_',a.company_id,a.human_pid)) as rowkey
          |        ,a.company_id
          |        ,a.company_name
          |        ,a.human_name
          |        ,hash(a.human_name) AS hid
-         |        ,concat('p',md5(uuid())) human_pid
+         |        ,a.human_pid
          |        ,a.STATUS
          |        ,a.create_time
          |        ,a.update_time
@@ -185,7 +185,7 @@ case class inc_company_relation_v2(s: SparkSession,
          |        ,c.reg_capital_amount,c.cate_first_code
          |        ,c.cate_second_code,c.cate_third_code
          |FROM    (
-         |            SELECT  *
+         |            SELECT  *,concat('p',md5(uuid())) human_pid
          |            FROM    (
          |                        SELECT  company_id,company_name,human_name,hid,status,create_time,update_time,0 as deleted
          |                                ,ROW_NUMBER() OVER (PARTITION BY company_id,human_name ORDER BY ds desc,update_time desc) num
@@ -509,7 +509,7 @@ case class inc_company_relation_v2(s: SparkSession,
     addEmptyPartitionOrSkip(inc_ads_relation_staff_kafka, ds)
     addEmptyPartitionOrSkip(inc_ads_relation_legal_entity_v1_kafka, ds)
     addEmptyPartitionOrSkip(inc_ads_relation_legal_entity_v2_kafka, ds)
-    addEmptyPartitionOrSkip(inc_ads_person_node_label_kafka, ds)
+    //addEmptyPartitionOrSkip(inc_ads_person_node_label_kafka, ds)
 
   }