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

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

Copy link to this message
bincod evaluation

  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