Hive与Sql语言很像,
use 数据库;
以建一个student表为例:
create table student(id int,name string) row format delimited fields terminated by " ";
编写student.txt文件(中间以tab键隔开 即 )
2 Tiny
3 Fun
4 Mark
5 Yong
load data local inpath "/opt/module/datas/student.txt" into table student;
OK