USE dwh;
DROP TABLE IF EXISTS dm_device_age;
CREATE EXTERNAL TABLE dm_device_age(
  device_id string,
  device_type string,
  package_names string,
  age string,
  tag string,
  update_date string
)PARTITIONED BY (
  year string,
  month string,
  day 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_age';