Support Questions
Find answers, ask questions, and share your expertise

Shark insert/append record into a table without referring to other table?

Explorer

Hi,

I'm using Shark  0.81  with Hive 0.9.0.

 

How can I directly insert/append record into a table  without referring to other table?

 

I know we can use  

insert into table emp_cached SELECT stack(3 , 1 , "row1" , 2 , "row2", 3 , "row3") AS (empid, name) FROM one;

but I want  direct insert without referring any other table.

 

I tried below one with few change in belwo qury but didn't work.

localhost:4588] shark> describe bank_tab1_cached;                                            
empid int 
name string 
Time taken (including network latency): 0.135 seconds
[localhost:4588] shark> insert into TABLE bank_tab1_cached (empid,name)  values (21,'XYZ'); 
[Hive Error]: Query returned non-zero code: 11, cause: FAILED: Parse Error: line 1:35 cannot recognize input near '(' 'empid' ',' in select clause

 

Can some one help plz?

Thanks,

Abhishek

1 REPLY 1

Re: Shark insert/append record into a table without referring to other table?

Explorer

Any clue on it plz?