hive 建表语句(外部表)

CREATE EXTERNAL TABLE `ias.tbl_ex_pengpai_topic_data_origin_orc`(
  `record_time` string,
  `trace_id` string,
  `template_version` string,
  `template_type` string,
  `client_time` string,
  `protocol_version` string,
  `app_version` string,
  `app_package_name` string,
  `ias_client_version` string,
  `ias_client_hsn_id` string,
  `job_id` string,
  `task_id` string,
  `location` string,
  `mobile` string,
  `ias_client_ip` string,
  `topic_id` string,
  `topic_title` string,
  `topic_pic_url` string,
  `topic_description` string,
  `topic_publish_time` string,
  `author_name` string,
  `author_fans_count` string,
  `author_description` string,
  `page_name` string COMMENT 'page_name')
  PARTITIONED BY (`dt` string,`hour` string)
  ROW FORMAT DELIMITED
  FIELDS TERMINATED BY '\t'
  LINES TERMINATED BY '\n'
STORED AS ORC
LOCATION '/data/ias/snapshot/tbl_ex_pengpai_topic_data_origin_orc'

你可能感兴趣的:(2018年7月)