Hi,

I am storing tweets in HDFS and creating external table on top of these
tweets..
The command I am using is bellow:

*create external table tweets (*
*  id bigint,*
*  in_reply_to_screen_name string,*
*  in_reply_to_status_id bigint,*
*  user struct<*
*      id: bigint,     *
*      name: string,*
*      screen_name: string>,*
*  retweeted_status struct <*
*  id:bigint>,*
*   text string*
* )*
*partitioned by (yyyymmdd int)*
*ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'*
*location 'my location';*

But I am getting the following error:

org.apache.ambari.view.hive.client.HiveInvalidQueryException: Error
while compiling statement: FAILED: ParseException line 5:2 Failed to
recognize predicate 'user'. Failed rule: 'identifier' in column
specification [ERROR_STATUS]

Without "user" definition"  query runs fine.

Can it be because 'user' is reserved keyword? Or there is something else?
"user" as part of tweet structure. How can I name column differently?

Thank in advance.

Reply via email to