3

I am using latest AWS Hive version 0.13.0.

FAILED: ParseException: cannot recognize input near 'exchange' 'string' ',' in column specification

I am getting the above error when I run the below(create table) query.

CREATE EXTERNAL TABLE test ( 
foo string, 
exchange string,
bar string) ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t' 
LINES TERMINATED BY '\n' 
STORED AS TEXTFILE
LOCATION '/home/hadoop/test/';

If I rename the exchange like 'xch' it creates table successfully. Any reason?

2 Answers 2

3

You are getting an error because exchange is a keyword used to move the data in a partition from a table to another table that has the same schema but does not already have that partition for details view Hive Language Manual and HIVE-4095.

Sign up to request clarification or add additional context in comments.

Comments

0

Try it like this after create statement LOAD DATA LOCAL INPATH '/home/cloudera/Amit/xyz.csv' OVERWRITE INTO TABLE tabele_name;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.