spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vasu C <vasuc.bigd...@gmail.com>
Subject Re: Spark/HIVE Insert Into values Error
Date Thu, 13 Nov 2014 16:15:29 GMT
Hi Arthur,

May I know what is the solution., I have similar requirements.


Regards,
  Vasu C

On Sun, Oct 26, 2014 at 12:09 PM, Arthur.hk.chan@gmail.com <
arthur.hk.chan@gmail.com> wrote:

> Hi,
>
> I have already found the way about how to “insert into HIVE_TABLE values
> (…..)
>
> Regards
> Arthur
>
> On 18 Oct, 2014, at 10:09 pm, Cheng Lian <lian.cs.zju@gmail.com> wrote:
>
>  Currently Spark SQL uses Hive 0.12.0, which doesn't support the INSERT
> INTO ... VALUES ... syntax.
>
> On 10/18/14 1:33 AM, Arthur.hk.chan@gmail.com wrote:
>
> Hi,
>
>  When trying to insert records into HIVE, I got error,
>
>  My Spark is 1.1.0 and Hive 0.12.0
>
>  Any idea what would be wrong?
> Regards
> Arthur
>
>
>
>  hive> CREATE TABLE students (name VARCHAR(64), age INT, gpa int);
>
> OK
>
>  hive> INSERT INTO TABLE students VALUES ('fred flintstone', 35, 1);
> NoViableAltException(26@[])
>  at
> org.apache.hadoop.hive.ql.parse.HiveParser_SelectClauseParser.selectClause(HiveParser_SelectClauseParser.java:693)
>  at
> org.apache.hadoop.hive.ql.parse.HiveParser.selectClause(HiveParser.java:31374)
>  at
> org.apache.hadoop.hive.ql.parse.HiveParser.regular_body(HiveParser.java:29083)
>  at
> org.apache.hadoop.hive.ql.parse.HiveParser.queryStatement(HiveParser.java:28968)
>  at
> org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpression(HiveParser.java:28762)
>  at
> org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:1238)
>  at
> org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:938)
>  at
> org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:190)
>  at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:424)
>  at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:342)
>  at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:977)
>  at org.apache.hadoop.hive.ql.Driver.run(Driver.java:888)
>  at
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
>  at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
>  at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
>  at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:781)
>  at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
>  at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:606)
>  at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
> FAILED: ParseException line 1:27 cannot recognize input near 'VALUES' '('
> ''fred flintstone'' in select clause
>
>
>
>
>

Mime
View raw message