创建表导入文本数据
hive> CREATE TABLE test1(name STRING,age INT, address STRING,school STRING)
. . > ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'. . > STORED AS TEXTFILE ;
显示表结构
hive> desc test1;
name string
age int
address string
school string
导入数据
hive> load data local inpath "e:/hive/test1.txt" into table test1;注意: 数据之间使用 tab键隔开
显示数据
hive> select * from test1;