- 创建表
hive> CREATE TABLE t_hive (age int, num int, size int) ROW FORMAT DELIMITED FIELDS TERMINATED BY ‘,’;
- 导入本地数据到hive
hive>LOAD DATA LOCAL INPATH ‘/root/test’ OVERWRITE INTO TABLE t_hive ;
- 从HDFS加载数据
hive>LOAD DATA INPATH ‘/num.txt’ OVERWRITE INTO TABLE t_hive;
- 从其他表导入数据
hive> INSERT OVERWRITE TABLE t_hive SELECT * FROM xxx ;