Objective : Declare a comma seperated string constant
test.csv
=========
a
b
c
d
e
f
Pig Script :
%declare ACTIVE_VALUES 'a', 'b','c' ;
-- Declaring constant like this using "" (double quotes) or even using escape characters (\) is resulting in a WARN message as below
-- WARN org.apache.pig.tools.parameters.PreprocessorContext - Warning : Multiple values found for ACTIVE_VALUES
A = LOAD 'test.csv' using PigStorage(',') AS (value:chararray);
B = FILTER A BY value in ($ACTIVE_VALUES);
dump B;
Expected Output :
a
b
c
Any inputs on declaring a comma separated string constant in Pig.
-- Declaring constant like this using "" (double quotes) or even using escape characters (\) is resulting in a WARN message as below
-- WARN org.apache.pig.tools.parameters.PreprocessorContext - Warning : Multiple values found for ACTIVE_VALUES