1 CREATE TABLE employees ( 2 id INT, 3 name STRING, 4 age INT, 5 salary FLOAT 6 ) 7 ROW FORMAT DELIMITED 8 FIELDS TERMINATED BY ',' 9 STORED AS TEXTFILE; 10 11 -- 将数据上传到HDFS 12 hadoop fs -put employees.csv /input 13 14 -- 导入数据到Hive表 15 LOAD DATA INPATH '/input/employees.csv' INTO TABLE employees; 16 17 -- 验证数据导入 18 SELECT * FROM employees;
标签:导入到,hdfs,--,employees,hive,TABLE,csv From: https://www.cnblogs.com/fan-wang/p/17720736.html