Hive Error: ParseException line 10:43 mismatched input '<EOF>' expecting StringLiteral near 'BY' in table row format's field separator

This is for Hadoop eco system like HDFS, Map reduce, Hive, Hbase, Pig, sqoop,sqoop2, Avro, solr, hcatalog, impala, Oozie, Zoo Keeper and Hadoop distribution like Cloudera, Hortonwork etc.
ramverma
Posts: 435
Joined: Sat Aug 23, 2014 5:34 pm
Contact:

Hive Error: ParseException line 10:43 mismatched input '<EOF>' expecting StringLiteral near 'BY' in table row format's field separator

Postby ramverma » Wed Nov 04, 2015 10:51 pm

CREATE TABLE kofax_table1 (
custNo string,
AgrreDate string,
CustName String,
MainAmount String,
ProDate String,
Address String

)
row format delimited fields terminated by ';' ;

MismatchedTokenException(-1!=298)
at org.antlr.runtime.BaseRecognizer.recoverFromMismatchedToken(BaseRecognizer.java:617)
at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:115)
at org.apache.hadoop.hive.ql.parse.HiveParser.tableRowFormatFieldIdentifier(HiveParser.java:31777)
at org.apache.hadoop.hive.ql.parse.HiveParser.rowFormatDelimited(HiveParser.java:30730)
at org.apache.hadoop.hive.ql.parse.HiveParser.tableRowFormat(HiveParser.java:31006)
at org.apache.hadoop.hive.ql.parse.HiveParser.createTableStatement(HiveParser.java:4677)
at org.apache.hadoop.hive.ql.parse.HiveParser.ddlStatement(HiveParser.java:2138)
at org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:1392)
at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1030)
at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:199)
at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:414)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:332)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:988)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1053)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:924)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:914)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:269)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:221)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:431)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:800)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:694)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:633)
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 10:43 mismatched input '<EOF>' expecting StringLiteral near 'BY' in table row format's field separator


Guest

Re: Hive Error: ParseException line 10:43 mismatched input '<EOF>' expecting StringLiteral near 'BY' in table row format's field separator

Postby Guest » Thu Nov 05, 2015 9:45 pm

I think use OCT for ';', it will work.

CREATE TABLE kofax_table1 (
custNo string,
AgrreDate string,
CustName String,
MainAmount String,
ProDate String,
Address String

)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\073';

or
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\073' LINES TERMINATED BY '\n'
STORED AS TEXTFILE;


Return to “Hadoop and Big Data”

Who is online

Users browsing this forum: No registered users and 2 guests