quux00 / hive-json-schema

Tool to generate a Hive schema from a JSON example doc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auto generated schema with reserved name: timestamp

omidvd79 opened this issue · comments

I changed: timestamp to time_stamp, to overcome the problem.

CREATE TABLE visits (
time_stamp string,
user_info struct<app_key:string, device_id:string, user_id:string>,
visit struct<end_time:string, event_type:string, id:string, is_confirmed:boolean, is_ongoing:boolean, place:struct<estimated_address:struct<cc:string, city:string, country:string, formatted_address:string, formatted_city:string, postal_code:string, state:string, street_address:string>, estimated_geolocation:struct<accuracy:double, lat:double, long:double>, first_visit_time:string, id:string, last_visit_time:string, type:string>, place_id:string, start_time:string>)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe';

Why not just use backticks("`") ?