Employee table creation in Hive
Thats it... Table creation and data load is completed :)
create table if not exists employee1 ( eid int, name string,
salary string, destination string)
comment 'Employee
details'
row format delimited
fields terminated by '\t'
lines terminated by
'\n'
stored as
textfile;
Now, to load
data into this table, prepare a tab delimited data file and place it into anywhere
in the local directory
Load the emp.txt into employee1 table
Load data
local inpath ‘/tmp/emp.txt’ into table employee1;
Thats it... Table creation and data load is completed :)
No comments:
Post a Comment