Hortonworks Sandbox Forum

error in loading data into sandbox-Tutorial6

  • #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

to create new topics or reply. | New User Registration

  • Author
    Replies
  • #46647
    Dave
    Moderator

    Hi TR,

    Can you please attach the error which you are getting?

    Thanks

    Dave

    #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

    #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

You must be to reply to this topic. | Create Account

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.