Browse Source

完善dim

wudianlong 2 years ago
parent
commit
74d2f0d331
2 changed files with 2 additions and 1 deletions
  1. 1 1
      example/function/sqoop_func.sh
  2. 1 0
      example/hive_ddl/saga_dw_dim.sql

+ 1 - 1
example/function/sqoop_func.sh

@@ -44,7 +44,7 @@ dim_date(){
 }
 
 dim_office_meter(){
-  import_no_partition $url $username $password /warehouse/saga_dw/dim/tmp/ "id, meter, branch_code, branch_name, use_range, parent_code, branch_type, use_range_type" "select id, meter, branch_code, branch_name, use_range, parent_code, branch_type, use_range_type from dim_office_meter where 1 = 1 " dim_office_meter
+  import_no_partition $url $username $password /warehouse/saga_dw/dim/tmp/ "id, meter, branch_code, branch_name, branch_type, branch_type_name, parent_code, use_range_type, use_range" "select id, meter, branch_code, branch_name, branch_type, branch_type_name, parent_code, use_range_type, use_range from dim_office_meter where 1 = 1 " dim_office_meter
 }
 
 

+ 1 - 0
example/hive_ddl/saga_dw_dim.sql

@@ -6,6 +6,7 @@ create table saga_dw.dim_office_meter
     branch_code string comment '支路编码',
     branch_name string comment '支路名称',
     branch_type string comment '支路类型',
+    branch_type_name string comment '支路类型名称',
     parent_code string comment '上级表编码',
     use_range_type string comment '控制区域',
     use_range   string comment '区域范围'