HIVE Project - Table Creation

Hi

I am facing challenge in creating table “Tweets_raw” in the hive editor. It gives an error in line
“user STRUCT<” and details are

Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near ‘user’ ‘STRUCT’ '<'

Hi Norman,

Can you please paste the command you are using to create the table?

Hi
Here is the command.

CREATE EXTERNAL TABLE tweets_raw (

    id BIGINT,

    created_at STRING,

    source STRING,

    favorited BOOLEAN,

    retweet_count INT,

    retweeted_status STRUCT<

    text:STRING,

    users:STRUCT<screen_name:STRING,name:STRING>>,

    entities STRUCT<

    urls:ARRAY<STRUCT<expanded_url:STRING>>,

    user_mentions:ARRAY<STRUCT<screen_name:STRING,name:STRING>>,

    hashtags:ARRAY<STRUCT<text:STRING>>>,

    text STRING,

    user STRUCT<

    screen_name:STRING,

    name:STRING,

    friends_count:INT,

    followers_count:INT,

    statuses_count:INT,

    verified:BOOLEAN,

    utc_offset:STRING, -- was INT but nulls are strings

    time_zone:STRING>,

    in_reply_to_screen_name STRING,

    year int,

    month int,

    day int,

    hour int

    )

    ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'

    WITH SERDEPROPERTIES ("ignore.malformed.json" = "true")

    LOCATION '/user/YOUR_USER_NAME/SentimentFiles/SentimentFiles/upload/data/tweets_raw'

    ;