USE dwh;
DROP TABLE IF EXISTS dm_device_tag_statistics;
CREATE EXTERNAL TABLE dm_device_tag_statistics(
  device_id string,
  tag_type string,
  first_tag string,
  second_tag string,
  cnt string
)PARTITIONED BY (
  dt string
) ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
LOCATION 's3://mob-emr-test/dataplatform/DataWareHouse/data/dwh/dm_device_tag_statistics';