Reply
New Contributor
Posts: 1
Registered: ‎08-15-2015

Cloudera Live Tutorial Exercise 2 - Get ERROR: AnalysisException: Syntax error in line 3:

I getting the following error in Exercie 2 in the section "Correlate Structured Data with Unstructured Data" -  AnalysisException: Syntax error in line 3: date STRING, ^ Encountered: DATE Expected: IDENTIFIER CAUSED BY: Exception: Syntax error in the create table SQL:

 

CREATE EXTERNAL TABLE intermediate_access_logs (
ip STRING,
date STRING,
method STRING,
url STRING,
http_version STRING,
code1 STRING,
code2 STRING,
dash STRING,
user_agent STRING)
ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
WITH SERDEPROPERTIES (
'input.regex' = '([^ ]*) - - \\[([^\\]]*)\\] "([^\ ]*) ([^\ ]*) ([^\ ]*)" (\\d*) (\\d*) "([^"]*)" "([^"]*)"',
'output.format.string' = "%1$$s %2$$s %3$$s %4$$s %5$$s %6$$s %7$$s %8$$s %9$$s")
LOCATION '/user/hive/warehouse/original_access_logs';

 

If I delete line 3 assigning date fiield to data type STRING, I get another error:

 

AnalysisException: Syntax error in line 10: ROW FORMAT SERDE 'org.apache.hadoop.hiv... ^ Encountered: IDENTIFIER Expected: DELIMITED CAUSED BY: Exception: Syntax error

 

How should I change the query to fix these errors.  I just downloaded Cloudera Live this week so should have the newest verions of all the software.

 

 

Highlighted
New Contributor
Posts: 1
Registered: ‎12-02-2015

Re: Cloudera Live Tutorial Exercise 2 - Get ERROR: AnalysisException: Syntax error in line 3:

Hello everyone.

 

I'm think you try enter a query in impala module, but you must use hive.

 

With best regards.

@td_mulga

Explorer
Posts: 14
Registered: ‎05-22-2016

Re: Cloudera Live Tutorial Exercise 2 - Get ERROR: AnalysisException: Syntax error in line 3:

I am doing this in Impala Query Editor (I think the tutorial tells us to do that), yet I got this same error message.

Cloudera Employee
Posts: 28
Registered: ‎11-24-2015

Re: Cloudera Live Tutorial Exercise 2 - Get ERROR: AnalysisException: Syntax error in line 3:

Pretty certain it says to use the Hive Query Editor for this portion. You'll use the Impala Query Editor later.

Cloudera Employee
Posts: 435
Registered: ‎07-12-2013

Re: Cloudera Live Tutorial Exercise 2 - Get ERROR: AnalysisException: Syntax error in line 3:

Are you sure you're entering that query in the Hive Query Editor? This
stage uses some features of Hive that do not work in Impala. Other parts of
the tutorial (namely querying the data once it's ETL'd) do require the
Impala Query Editor so it's easy to get those mixed up.
New Contributor
Posts: 1
Registered: ‎11-13-2018

Re: Cloudera Live Tutorial Exercise 2 - Get ERROR: AnalysisException: Syntax error in line 3:

Dear I executed it on Hive Editor but I recieved the following Message

 

"Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:hdfs://quickstart.cloudera:8020/user/hive/warehouse/original_access_logs is not a directory or unable to create one)"

 

any comment or help on that??

RKL
New Contributor
Posts: 1
Registered: ‎06-16-2019

Re: Cloudera Live Tutorial Exercise 2 - Get ERROR: AnalysisException: Syntax error in line 3:

Any one got solution for this problem i.e. to fix this error?