Created 11-12-2016 10:45 PM
Have an external HIVE table that is based on an avro files and one of the column description is as below. When trying to do SELECT on that with header.timestamp, it fails with the error below. Is there way to query columns with the keywords?
col_name data_type
header struct<versionnum:binary, timestamp:bigint,uuid:binary>
Error:
Error while compiling statement: FAILED: ParseException line 1:80 Failed to recognize predicate 'timestamp'. Failed rule: 'identifier' in expression specification
Created 11-13-2016 06:24 PM
Hi Kumar,
Please check this https://issues.apache.org/jira/browse/HIVE-10294
Created 11-13-2016 06:24 PM
Hi Kumar,
Please check this https://issues.apache.org/jira/browse/HIVE-10294
Created 11-14-2016 08:36 PM
Try using back ticks ` around the column name like `column`.
Created 11-19-2016 11:55 PM
Thanks,
After doing "set hive.support.sql11.reserved.keywords=false", it allows to query the column with the keyword.
When using back quotes, it gives the following error:
select `header.timestamp` from avro_test_channel;
FAILED: SemanticException [Error 10004]: Line 1:7 Invalid table alias or column reference 'header.timestamp': (possible column names are:
Created 01-28-2017 06:20 AM
For the backtick approach, you might want to try `header`.`timestamp`