hive建表,
hive分内部表和外部表
create table xxx(
logtime string ,
traceid string ,
param string ,
result string ,
runtime string
) partitioned by (
logday string
) row format delimited fields terminated by '\t'
collection items terminated by ','
lines terminated by '\n'
stored as textfile
location '/xxxxxxxx/xxxx';
CREATE EXTERNAL TABLE page_view(
viewTime INT,
userid BIGINT,
page_url STRING,
referrer_url STRING,
ip STRING COMMENT 'IP Address of the User',
country STRING COMMENT 'country of origination')
COMMENT 'This is the staging page view table'
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\054'
STORED AS TEXTFILE
LOCATION '/user/hadoop/warehouse/page_view';
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。