energy_hive.sql 504 B

123456789101112131415161718
  1. /** 历史数据 */
  2. create table ods_energy_15_min_history
  3. (
  4. building string,
  5. func_id string,
  6. meter string,
  7. data_time string,
  8. data_value decimal(20, 15),
  9. `dt` string
  10. ) COMMENT '能源原始数据15min历史数据'
  11. partitioned by (`dt` string)
  12. ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001'
  13. STORED AS TEXTFILE
  14. LOCATION
  15. 'hdfs://sagaCluster:8020/warehouse/saga_dw/ods/ods_energy_15_min_history'
  16. TBLPROPERTIES (
  17. 'orc.compress'='lzo');