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

Switch to Threaded View
Pig >> mail # user >> is null function


Copy link to this message
-
is null function
can anyone tell me why the following won't work

i have bags like this:

x:
(utm_source,3)
(sprint_&utm_medium,3)
(banner&utm_campaign,3)
(sprint,3)

i wanna filter out all the bags with 'utm' included and get the last one (sprint, 3),
this is what i used:

y = FILTER x BY REGEX_EXTRACT($0, '(.*)utm(.*)', 0) == null;
this one return nothing;

y = FILTER x BY REGEX_EXTRACT($0, '(.*)utm(.*)', 0) is null;
this one return:
ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Encountered " "is" "is "" at line 1, column 53.
Was expecting one of:
    "parallel" ...
    "and" ...
    "or" ...
    ";" ...

please help!