I am new to hive, and want to know if there is anyway to insert data into hive table like we do in SQL. I want to insert my data into hive like
INSERT INTO tablename VALUES (value1,value2..)
I have read that you can load the data from a file to hive table or you can import data from one table to hive table but is there any way to append the data as in SQL?
Yes we can use Insert query in hive.
hive> create table test (id int, name string);
INSERT : INSERT...VALUES is available starting in version :Hive 0.14.
hive> insert into table test values (1,'mytest');
This is going to work for insert. we have to use values keyword.
Note: User cannot insert data into a complex datatype column (array, map, struct, union) using the **INSERT INTO...VALUES clause.