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?

Brisi
  • 1,781
  • 7
  • 26
  • 41

2 Answers2

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.

Ashrith
  • 6,745
  • 2
  • 29
  • 36
0

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

Amit Bhat
  • 13
  • 6