hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Gates <alanfga...@gmail.com>
Subject Re: How to specify column list in hive insert into query?
Date Tue, 17 Mar 2015 15:19:43 GMT
This feature is not available in Hive 1.1.  It will be added in 1.2 (it 
has already been checked into trunk).  In 1.1 and previous your values 
clause has to contain a value for every column in the table in the 
proper order.  So you would change your insert below to be

insert into person values ("Alan", "Green");

Alan.

> ?????? ????? ?????? <mailto:slavakileev@yandex.ru>
> March 17, 2015 at 3:52
> I have just installed and configured Apache Hive version 1.1.0. Then I 
> have created a table by quering this query:
>
> create table person (name1 string, surname1 string);
>
> And then I want to add one row by:
>
> insert into person (name1, surname1) values ("Alan", "Green");
>
>
> And it cause an error:
>
> Error: Error while compiling statement: FAILED: ParseException line 
> 1:20 cannot recognize input near '(' 'name1' ',' in statement 
> (state=42000,code=40000).
>
> But when I execute query without column list it works fine:
>
> insert into person values ("Alan", "Green");
>
> The question is: how to specify column list in hiveQL to make insert into?

Mime
View raw message