I'm trying to load data from Phoenix into a pig script for processing
I have a pig script like so -
grain1 = LOAD 'cache' USING USING PigStorage(',')
AS (partitionNumber: chararray, Id: chararray);
DUMP grain1;// grain 1 dumps Id's correctly.
Question How do I pass in the Id from grain 1 into the script below?
outBag = LOAD 'hbase://query/ SELECT MY_COL FROM.MY_TABLE WHERE ID=? AND (SENT_DATE >= to_date(\'$date\', \'$date_format\') - 1) AND (SENT_DATE < to_date(\'$_date\', \'$format\'))'
USING org.apache.phoenix.pig.PhoenixHBaseLoader('localhost')';
How do I correctly pass in the value from the previous pig statement as a parameter to LOAD? I've been able to pass variables from the command prompt as in my script though.