Grokbase Groups Pig user October 2010
FAQ
Hi,

Does anyone know if Bash shell works with Pig streaming the same way as
Python? I've been struggling with it without success.

Here is the bash code (filter.sh)

#!/usr/bin/env bash
command /dev/stdin -arguments > /dev/stdout
exit 0

And in the pig script, I did

DEFINE filter `filter.sh`
INPUT (stdin using PigStreaming(','))
OUTPUT (stdout using PigStreaming(','))
SHIP ('filter.sh');

outdata = STREAM indata THROUGH filter;


I can't figure out what's wrong with the code above. But outdata is simply
an empty tuple. Can anyone help? Thanks!

Search Discussions

  • Alex Wang at Oct 18, 2010 at 10:34 pm
    Hi,

    Does anyone know if Bash shell works with Pig streaming the same way as
    Python? I've been struggling with it without success.

    Here is the bash code (filter.sh)

    #!/usr/bin/env bash
    command /dev/stdin -arguments > /dev/stdout
    exit 0

    And in the pig script, I did

    DEFINE filter `filter.sh`
    INPUT (stdin using PigStreaming(','))
    OUTPUT (stdout using PigStreaming(','))
    SHIP ('filter.sh');

    outdata = STREAM indata THROUGH filter;


    I can't figure out what's wrong with the code above. But outdata is simply
    an empty tuple. Can anyone help? Thanks!

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriespig, hadoop
postedOct 18, '10 at 10:22p
activeOct 18, '10 at 10:34p
posts2
users1
websitepig.apache.org

1 user in discussion

Alex Wang: 2 posts

People

Translate

site design / logo © 2021 Grokbase