1 -- 从本地文件加载数据: 2 LOAD DATA LOCAL INPATH '/home/hadoop/input/ncdc/micro-tab/sample.txt' OVERWRITE INTO TABLE records; 3 load data local inpath '/home/hive/partitions/files' into table logs partition (dt='2017-08-01',country='GB');
1 -- 数据导出 2 beeline -u jdbc:hive2://ip:port -n username -p password --verbose=true --outputformat=dsv -e " 3 select * from table_name 4 " > table_name.dsv
1 -- 导出数据 2 insert overwrite local directory '/tmp/table_name/' 3 row format delimited fields terminated by ',' 4 select * from table_name; 5 6 hive -e " 7 set mapred.job.queue.name=queue_name; 8 set hive.cli.print.header=true; 9 use db_name; 10 select * from table_name;" > table_name.txt