Browse Source

更新建表语句

wudianlong 2 years ago
parent
commit
a536a8e083
1 changed files with 17 additions and 0 deletions
  1. 17 0
      energy/dayTask/energy_hive.sql

+ 17 - 0
energy/dayTask/energy_hive.sql

@@ -190,3 +190,20 @@ create table ods_humidity_15_min
         'hdfs://sagaCluster:8020/warehouse/saga_dw/ods/ods_humidity_15_min'
     TBLPROPERTIES (
         'orc.compress'='lzo');
+
+
+create table ods_history_tmp
+(
+    building   string,
+    func_id    string,
+    meter      string,
+    data_time  string,
+    data_value decimal(30, 15)
+) COMMENT '历史数据中间表'
+    PARTITIONED BY (`dt` string)
+    ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001'
+    STORED AS TEXTFILE
+    LOCATION
+        'hdfs://sagaCluster:8020/warehouse/saga_dw/ods/tmp/ods_history_tmp'
+    TBLPROPERTIES (
+        'orc.compress'='lzo');