代码改变世界

hive 建表导入数据

1、

  1. hive> create table wyp
  2.     > (id int, name string,
  3.     > age int, tel string)
  4.     > ROW FORMAT DELIMITED
  5.     > FIELDS TERMINATED BY '\t'
  6.     > STORED AS TEXTFILE;

 

2、

  1. cat wyp.txt
  2. 1       wyp     25      13188888888888
  3. 2       test    30      13888888888888
  4. 3       zs      34      899314121

3、

load data local inpath 'wyp.txt' into table wyp;

posted on 2017-09-14 11:35  Captain林  阅读(3260)  评论(0编辑  收藏  举报

导航