hive加载数据到表中

1.mkdir data

2.cd data

3.vim student.txt

1001   zhangshan

1002   lishi

1003   zhaoliu

(tab键间隔)

4.创建表

 create table student(id int, name string) ROW FORMAT DELIMITED FIELDS TERMINATED

 BY '\t';

5.load data local inpath '/data/student.txt'  into table student;

6.select * from student;

 

posted @ 2021-07-26 09:57  无敌小阿没  阅读(132)  评论(0编辑  收藏  举报