create database if not exists myhive; use myhive;
row format delimited fields terminated by ‘,‘:指定字段之间的分隔符
stored as textfile:指定文件存储格式
create table if not exists test(XXX int,XXX string) row format delimited fields terminated by ‘,‘ stored as textfile;
load data local inpath ‘/test.txt‘ into table test;
insert overwrite local directory "/test/out/" row format delimited fields terminated by "\t" select * from test;
insert overwrite directory "/test/out/" row format delimited fields terminated by "\t" select * from test;
原文:https://www.cnblogs.com/MoooJL/p/14059089.html