Grokbase Groups Pig user May 2013
FAQ
Dear all,

I wonder if someone can tell me if the current version of pig support loop
and branching?

regards!

Yong

Search Discussions

  • Jonathan Coveney at May 7, 2013 at 1:59 pm
    pig latin does not support it, but it is pretty easy to do it by using the
    python control flow. this or java is the preferred way of doing it.


    2013/5/7 yonghu <yongyong313@gmail.com>
    Dear all,

    I wonder if someone can tell me if the current version of pig support loop
    and branching?

    regards!

    Yong
  • Shahab Yunus at May 7, 2013 at 2:00 pm
    Jonathan, What do you mean by using Java? Incorporating UDFs? Sorry, I
    didn't get it.

    Regards,
    Shahab

    On Tue, May 7, 2013 at 9:58 AM, Jonathan Coveney wrote:

    pig latin does not support it, but it is pretty easy to do it by using the
    python control flow. this or java is the preferred way of doing it.


    2013/5/7 yonghu <yongyong313@gmail.com>
    Dear all,

    I wonder if someone can tell me if the current version of pig support loop
    and branching?

    regards!

    Yong
  • Tom Wheeler at May 7, 2013 at 2:00 pm
    Neither are supported directly in Pig Latin, but it is possible to embed
    Pig in another language such as Java or Python to achieve these:

         http://ofps.oreilly.com/titles/9781449302641/embedding.html
    On Tue, May 7, 2013 at 6:13 AM, yonghu wrote:

    Dear all,

    I wonder if someone can tell me if the current version of pig support loop
    and branching?

    regards!

    Yong


    --
    Tom Wheeler
    http://www.tomwheeler.com/
  • Shahab Yunus at May 7, 2013 at 2:01 pm
    Nevermind Jonathan, if you also meant the same thing what Tom Wheeler just
    posted. Thanks :)


    On Tue, May 7, 2013 at 9:59 AM, Tom Wheeler wrote:

    Neither are supported directly in Pig Latin, but it is possible to embed
    Pig in another language such as Java or Python to achieve these:

    http://ofps.oreilly.com/titles/9781449302641/embedding.html
    On Tue, May 7, 2013 at 6:13 AM, yonghu wrote:

    Dear all,

    I wonder if someone can tell me if the current version of pig support loop
    and branching?

    regards!

    Yong


    --
    Tom Wheeler
    http://www.tomwheeler.com/
  • Duckworth, Will at May 7, 2013 at 3:16 pm
    You can do it the way Tom suggests.

    Also take a look at PigServer / PigRunner

    https://wiki.apache.org/pig/EmbeddedPig
    https://pig.apache.org/docs/r0.11.0/api/org/apache/pig/PigServer.html

    Or use Java / Python and call the shell. Look at importing subprocess in Python or Runtime in Java.



    Will Duckworth Senior Vice President, Software Engineering | comScore, Inc.(NASDAQ:SCOR)
    o +1 (703) 438-2108 | m +1 (301) 606-2977 | mailto:wduckworth@comscore.com
    .....................................................................................................

    comScore Media Metrix(r) Multi-Platform: Audience Analytics for the Brave New Digital World

    www.comscore.com/multiplatform
    -----Original Message-----
    From: Shahab Yunus
    Sent: Tuesday, May 07, 2013 10:01 AM
    To: user@pig.apache.org
    Subject: Re: does pig support loop and branching now?

    Nevermind Jonathan, if you also meant the same thing what Tom Wheeler just posted. Thanks :)


    On Tue, May 7, 2013 at 9:59 AM, Tom Wheeler wrote:

    Neither are supported directly in Pig Latin, but it is possible to
    embed Pig in another language such as Java or Python to achieve these:

    http://ofps.oreilly.com/titles/9781449302641/embedding.html
    On Tue, May 7, 2013 at 6:13 AM, yonghu wrote:

    Dear all,

    I wonder if someone can tell me if the current version of pig
    support loop
    and branching?

    regards!

    Yong


    --
    Tom Wheeler
    http://www.tomwheeler.com/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriespig, hadoop
postedMay 7, '13 at 11:14a
activeMay 7, '13 at 3:16p
posts6
users5
websitepig.apache.org

People

Translate

site design / logo © 2021 Grokbase