I have created UDF_UPPER.jar
file in /home/GED385/pigScripts
.
[GED385@snshadoope1 pigScripts]$ jar tf /home/GED385/pigScripts/UDF_UPPER.jar | grep UPPER
UPPER.class
But while executing the pig i am getting below error.
grunt> exec digital_web_trkg_9.pig
2012-11-30 00:15:32,027 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve UDF_UPPER.UPPER using imports: [, org.apache.pig.builtin., org.apache.pig.impl.builtin.]
Details at logfile: /data/1/GED385/pigScripts_digital/pig_1354233151486.log
PIg scripts:
REGISTER /usr/lib/pig/contrib/piggybank/java/piggybank.jar;
REGISTER /home/GED385/pigScripts/UDF_UPPER.jar;
A = LOAD '/user/GED385/digital/scrn_rsln_id_cln.dat' USING PigStorage('|')
AS (web_vstr_scrn_rsln_id:int,web_vstr_scrn_rsln_desc :chararray, edw_publn_id:chararray);
B = LOAD '/user/GED385/digital/scrn_rsln_id1_cln.dat' USING PigStorage('|')
AS (web_vstr_scrn_rsln_id:int,web_vstr_scrn_rsln_desc :chararray, edw_publn_id:chararray);
H = LOAD '/user/GED385/digital/scrn_rsln_id_base_unload_cln.dat' USING PigStorage('|')
AS (web_vstr_scrn_rsln_id_1:int,web_vstr_scrn_rsln_desc :chararray, edw_publn_id:chararray);
J = GROUP H BY edw_publn_id;
K = FOREACH J GENERATE group, MAX(H.web_vstr_scrn_rsln_id_1);
C = UNION A, B;
D = FILTER C BY web_vstr_scrn_rsln_desc is not null;
E = DISTINCT D;
F = JOIN E BY web_vstr_scrn_rsln_desc LEFT , H BY web_vstr_scrn_rsln_desc;
I = FILTER F BY H::web_vstr_scrn_rsln_id_1 is null;
--G = FOREACH I GENERATE H::web_vstr_scrn_rsln_id_1,E::web_vstr_scrn_rsln_desc,E::edw_publn_id;
G = FOREACH I GENERATE K.$1+1,E::web_vstr_scrn_rsln_desc,E::edw_publn_id,UDF_UPPER.UPPER(E::web_vstr_scrn_rsln_desc);
--L = JOIN G BY $2 LEFT , K BY $0;
DUMP G;