Home Forums Hortonworks Sandbox error in loading data into sandbox-Tutorial6

This topic contains 3 replies, has 2 voices, and was last updated by  Dave 7 months ago.

  • Creator
    Topic
  • #46585

    TR RAO
    Participant

    In tutorial 6(loading the data into hortonworks Sandbox at the last step in executing the query editor after typing as below , I am getting error.Kindly give suggestion how to rectify that at this situation.

    create table webloganalytics as select to_date(o.ts) logdate, o.url, o.ip, o.city, upper(o.state) state, o.country, p.category, CAST(datediff( from_unixtime( unix_timestamp() ), from_unixtime( unix_timestamp(u.birth_dt, ‘dd-MMM-yy’))) / 365 AS INT) age, u.gender_cd gender from omniture o inner join products p on o.url = p.url left outer join users u on o.swid = concat(‘{‘, u.swid , ‘}’)

    After executing the above query i am getting error.

    regards
    TR RAO
    IIT Kharagpur

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #46918

    Dave
    Moderator

    Hi TR,

    I have checked your query and it is correct.
    I can recreate your issue if I do not have all the tables created – what tables show in HCatalog?
    Have you followed all the steps before creating this view – such as creating the users and products tables?
    Did you create the omniture view correctly, save the query and view the results?

    Thanks

    Dave

    Collapse
    #46889

    TR RAO
    Participant

    Hi Sir, for the below query,

    create table webloganalytics as select to_date(o.ts) logdate, o.url, o.ip, o.city, upper(o.state) state, o.country, p.category, CAST(datediff( from_unixtime( unix_timestamp() ), from_unixtime( unix_timestamp(u.birth_dt, ‘dd-MMM-yy’))) / 365 AS INT) age, u.gender_cd gender from omniture o inner join products p on o.url = p.url left outer join users u on o.swid = concat(‘{‘, u.swid , ‘}’)

    After typing the above query for sample data(omniture0.tsv) it is showing like —— Error occurred executing hive query: Unknown exception.

    Kindly suggest how to solve the above query at this situation.
    TR RAO
    IIT KHARAGPUR

    Collapse
    #46647

    Dave
    Moderator

    Hi TR,

    Can you please attach the error which you are getting?

    Thanks

    Dave

    Collapse
Viewing 3 replies - 1 through 3 (of 3 total)