Pig 0.12 in HDP 2.0 and ASSERT

to create new topics or reply. | New User Registration

Tagged: , ,

This topic contains 4 replies, has 2 voices, and was last updated by  Snoot 1 year, 2 months ago.

  • Creator
    Topic
  • #46162

    Snoot
    Participant

    Hi,

    I’m trying to use the ASSERT statement (e.g. assert a by a1 > 0 'a cant be negative for reasons';) which is supposed to be supported in Pig 0.12 that ships with HDP 2.0 but I get an error saying:

    [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Encountered " <IDENTIFIER> "assert "" at line 1, column 1.
    Was expecting one of:

    What went wrong?

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

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

  • Author
    Replies
  • #49024

    Snoot
    Participant

    Hi,

    I tried Jianyong Dai’s solution on both Pig 0.12.0.2.0.6.1-101 (rexported) compiled Jan 08 2014, 22:49:47 (on HDP 2.0) and 0.12.0 (r1529718) compiled Oct 07 2013, 12:20:14 (Hadoop 0.20) – and it doesn’t work. Any ideas on how to make it work before Pig 0.12.1?

    Collapse
    #48484

    Jianyong Dai
    Participant

    It is now fixed. Will come with Pig 0.12.1.

    Collapse
    #46892

    Jianyong Dai
    Participant

    Opened PIG-3670 for that.

    Collapse
    #46778

    Jianyong Dai
    Participant

    Seems there is a bug in implementation. You can use the following syntax for now:

    b = a by a1 > 0 'a cant be negative for reasons';

    Collapse
Viewing 4 replies - 1 through 4 (of 4 total)
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.