Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> bincod evaluation


+
jamal sasha 2012-11-15, 15:53
Copy link to this message
-
Re: bincod evaluation
Hi Jamal,

Please try:

Ginput = foreach Input generate (id1 IS NULL ?  2 : id1), (id2 IS NULL ? 42
: id2);

This is a known issue:
https://issues.apache.org/jira/browse/PIG-2595

Thanks,
Cheolsoo

On Thu, Nov 15, 2012 at 7:53 AM, jamal sasha <[EMAIL PROTECTED]> wrote:

> Hi,
>
>   I am trying to replace missing values with a precomputed value.
>
> But I am getting an error.
>
> So here is my code:
>
>
>
> Input = LOAD ‘data.txt’ USING PigStorage(‘,) AS (id1:double, id2:double);
>
> Ginput = foreach Input generate
>
> id1 IS NULL ?  2 : id1,
>
> id2 IS NULL ? 42 : id2;
>
>
>
> I am getting the error
>
> 2012-11-15 08:22:16,079 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1200: <file replace_mean.pig, line 15, column 3>  mismatched input
> 'IS' expecting semi column
> Thanks
>