Home Forums Hortonworks Sandbox Tutorials have no output

This topic contains 2 replies, has 2 voices, and was last updated by  Edward Cheadle 6 months, 2 weeks ago.

  • Creator
    Topic
  • #51499

    Edward Cheadle
    Participant

    The first tutorial listing NYSE stocks runs, says it succeeded, but there is no output. The Second is the same. I noticed that when running the program the interface is slightly different than the tutorial, the pig helper button was moved to the top, and somewhere in the information it said the api changed. So I was wondering if the pig statements are correct for the version of software I have. I am running version 2.0 of the sandbox. I checked the code and made sure it was exactly the same as in the tutorial, but still after I ran the pig script I did not get any output. I was wondering if the scripts work or has something changed?

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

You must be logged in to reply to this topic.

  • Author
    Replies
  • #51678

    Edward Cheadle
    Participant

    You are absolutely right. I tried using the dump command after each statement and found the errors, rookie mistakes. This is all very new to me and I was making simple mistakes.

    However, in the tutorial HCatalog, Basic Pig & Hive Commands, it says it will use two files:
    Master.csv
    Batting.csv

    I tried using the Batting.csv file as it states and nothing worked. It said change the column labled r to Runs and I could not find the column in the Batting.csv file. I changed to the BattingPost.csv file.found the r column changed it to Runs and all the subsequent commands worked. I am off to learn more about pig.

    I am trying to get some groups at our company who are looking into Big Data, to review your website. I am a systems administrator, so i am somewhat removed from the decision making but it seems as though you have great way of introducing Hadoop concepts so I am trying to learn more about it so I am better versed in telling people about what you do. The tutorials are interesting and I have learned a lot about Hadoop. Thank you.

    Collapse
    #51624

    iandr413
    Moderator

    Hi Edward,
    I just verified that they do still work You are correct that the UI may have slightly changed but there should be no effect from that. The PIG statements are correct and it should look like this:
    a = LOAD ‘nyse_stocks’ USING org.apache.hcatalog.pig.HCatLoader();
    b = filter a by stock_symbol == ‘IBM';
    c = group b all;
    d = foreach c generate AVG(b.stock_volume);
    dump d;

    Please ensure the data loaded properly. I hope this helps.

    Ian

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