hive> CREATE TABLE IF NOT EXISTS emp ( id int, name String,sal String, destination String)COMMENT ‘Employee details’ ROW FORMAT DELIMITED FIELDS TERMINATED BY ‘\t’ LINES TERMINATED BY ‘\n’ STORED AS TEXTFILE;
Load Data into Hive table:
hive> LOAD DATA LOCAL INPATH '/home/user/sample.txt' OVERWRITE INTO TABLE emp;
OK
Time taken: 15.905 seconds
hive>
Copyright ©2022 coderraj.com. All Rights Reserved.