/** 能源原始数据 15min 历史数据 */
create table ods_energy_15_min_history
(
    building   string,
    func_id    string,
    meter      string,
    data_time  string,
    data_value decimal(20, 15),
    `dt` string
) COMMENT '能源原始数据15min历史数据'
    partitioned by (`dt` string)
    ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001'
    STORED AS TEXTFILE
    LOCATION
        'hdfs://sagaCluster:8020/warehouse/saga_dw/ods/ods_energy_15_min_history'
    TBLPROPERTIES (
        'orc.compress'='lzo');

/** 能源原始数据 5min 历史数据 */
create table ods_energy_5_min_history
(
    building   string,
    func_id    string,
    meter      string,
    data_time  string,
    data_value decimal(20, 15),
    `dt` string
) COMMENT '能源原始数据15min历史数据'
    partitioned by (`dt` string)
    ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001'
    STORED AS TEXTFILE
    LOCATION
        'hdfs://sagaCluster:8020/warehouse/saga_dw/ods/ods_energy_5_min_history'
    TBLPROPERTIES (
        'orc.compress'='lzo');

/** 能源数据 15min */
create table ods_energy_15_min
(
    building   string,
    func_id    string,
    meter      string,
    data_time  string,
    data_value decimal(20, 15)
) COMMENT '能源原始数据15min'
    partitioned by (`dt` string)
    ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001'
    STORED AS TEXTFILE
    LOCATION
        'hdfs://sagaCluster:8020/warehouse/saga_dw/ods/ods_energy_15_min'
    TBLPROPERTIES (
        'orc.compress'='lzo');

/** 能源数据 5min */
create table ods_energy_5_min
(
    building   string,
    func_id    string,
    meter      string,
    data_time  string,
    data_value decimal(20, 15)
) COMMENT '能源原始数据15min'
    partitioned by (`dt` string)
    ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001'
    STORED AS TEXTFILE
    LOCATION
        'hdfs://sagaCluster:8020/warehouse/saga_dw/ods/ods_energy_5_min'
    TBLPROPERTIES (
        'orc.compress'='lzo');







