The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

Hortonworks Sandbox Forum

Tutorial 2 pig example not working

  • #29689
    Geeta Patil
    Member

    Hi,

    I am practicing pig in the sanbox tutorial 2 pig example on baseball csv file getting below error when executed and also when systax check is run

    2013-07-18 15:36:08,454 [main] INFO org.apache.pig.Main – Apache Pig version 0.11.1.1.3.0.0-107 (rexported) compiled May 20 2013, 03:04:35
    2013-07-18 15:36:08,455 [main] INFO org.apache.pig.Main – Logging error messages to: /hadoop/mapred/taskTracker/hue/jobcache/job_201307181532_0001/attempt_201307181532_0001_m_000000_0/work/pig_1374186968453.log
    2013-07-18 15:36:09,240 [main] INFO org.apache.pig.impl.util.Utils – Default bootup file /usr/lib/hadoop/.pigbootup not found
    2013-07-18 15:36:09,623 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine – Connecting to hadoop file system at: hdfs://sandbox:8020
    2013-07-18 15:36:09,912 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine – Connecting to map-reduce job tracker at: sandbox:50300
    2013-07-18 15:36:10,339 [main] ERROR org.apache.pig.tools.grunt.Grunt – ERROR 1000: Error during parsing. Encountered ” “a=LOAD “” at line 1, column 1.
    Was expecting one of:

    “cat” …
    “clear” …
    “fs” …
    “sh” …
    “cd” …
    “cp” …
    “copyFromLocal” …
    “copyToLocal” …
    “dump” …
    “describe” …
    “aliases” …
    “explain” …
    “help” …
    “history” …
    “kill” …
    “ls” …
    “mv” …
    “mkdir” …
    “pwd” …
    “quit” …
    “register” …
    “rm” …
    “rmf” …
    “set” …
    “illustrate” …
    “run” …
    “exec” …
    “scriptDone” …
    “” …
    “” …

    “;” …

    Details at logfile: /hadoop/mapred/taskTracker/hue/jobcache/job_201307181532_0001/attempt_201307181532_0001_m_000000_0/work/pig_1374186968453.log

    could you help me how to resolve this error

    thanks
    Geeta

  • Author
    Replies
  • #29692
    gehhrald
    Member

    Hi Geeta,

    Could you post your code? Most probably you had a typo at Line 1. You need spaces when loading the csv file.
    Eg: “a = LOAD “.

    Cheers,
    Gerald

    #29734
    Geeta Patil
    Member

    hi Gerald,

    Yeah as you pointed out it was problem with Load

    i had written it as a=Load.. we should give a space between = and Load then it worked a= Load

    thanks a lot

    Geeta

    #29736
    gehhrald
    Member

    Hi Geeta,

    No problem. I had that error previously as well. Glad that I could help.

    Cheers,
    Gerald

The forum ‘Hortonworks Sandbox’ is closed to new topics and replies.

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.