Say I am having a input file as map.
sample.txt [1#"anything",2#"something",3#"anotherthing"] [2#"kish"] [3#"mad"] [4#"sun"] [1#"moon"] [1#"world"]
Since there are no values with the specified key, I do not want to save it to a file. Is there any conditional statements that i can include with the Store into relation ? Please Help me thro' this, following is the pig script.
A = LOAD 'sample.txt'; B = FOREACH A GENERATE $0#'5' AS temp; C = FILTER B BY temp is not null; -- It actually generates an empty part-r-X file -- Is there any conditional statements i can include where if C is empty, Do not store ? STORE C INTO '/user/logs/output';
Thanks Am I going wrong somewhere ? Please correct me if I am wrong.