欢迎投稿

今日深度:

hive建表,

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';




www.htsjk.Com true http://www.htsjk.com/hive/39604.html NewsArticle 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 it...
相关文章
    暂无相关文章
评论暂时关闭