If you run the follwoing command in hive, it will fail because sort is a reserved keyword in hive
CREATE EXTERNAL TABLE aaaabc ( sort STRING )
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\002'
LINES TERMINATED BY '\n';
FAILED: Parse Error: line 1:31 mismatched input 'sort' expecting Identifier in column specification
To ovecome this, run the command by putting sort in backticks, i.e.
CREATE EXTERNAL TABLE aaaabc ( `sort` STRING )
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\002'
LINES TERMINATED BY '\n';
CREATE EXTERNAL TABLE aaaabc ( sort STRING )
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\002'
LINES TERMINATED BY '\n';
FAILED: Parse Error: line 1:31 mismatched input 'sort' expecting Identifier in column specification
To ovecome this, run the command by putting sort in backticks, i.e.
CREATE EXTERNAL TABLE aaaabc ( `sort` STRING )
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\002'
LINES TERMINATED BY '\n';
Valuable information thanks for sharing from Manasa
ReplyDelete