Reply
Highlighted
Explorer
Posts: 11
Registered: ‎10-06-2017

Cannot load data to Hive: IDENTIFIER Expected: INPATH CAUSED BY: Exception: Syntax error"

I have started with Cloudera Quickstart VM and I can succesfully load data to Hive table.

LOAD DATA LOCAL INPATH '/home/cloudera/workspace/MyData/Auto_Insurance_Claims_Sample.csv'

OVERWRITE INTO TABLE Auto_Insurance_Claims_US;

 

However I cannot do same in Cloudera Enterprise Data Hub. (I have stored file to correct folder)

LOAD DATA LOCAL INPATH '/tmp/MyData/Auto_Insurance_Claims_Sample.csv' 

OVERWRITE INTO TABLE Auto_Insurance_Claims_US;

 

"AnalysisException: Syntax error in line 1:undefined: LOAD DATA LOCAL INPATH '/tmp/KensData/... ^ Encountered: IDENTIFIER Expected: INPATH CAUSED BY: Exception: Syntax error"

 

In the right side of Hue view on Enterprise Data Hub, I see folde icon, but cannot see HDFS folder structure.

 

Is this right issue or configuration issues? Have I stored CSV file to optimal place?

Cloudera Employee
Posts: 213
Registered: ‎03-23-2015

Re: Cannot load data to Hive: IDENTIFIER Expected: INPATH CAUSED BY: Exception: Syntax error"

You query was trying to load file under /tmp/MyData/Auto_Insurance_Claims_Sample.csv, but the error message said /tmp/KensData/..., they don't match, do I miss anything here?

Can you please explain a bit more detail on below:

In the right side of Hue view on Enterprise Data Hub, I see folde icon, but cannot see HDFS folder structure.?
Announcements