i new pig. started learn on own , trying know pig. can please suggest me current system epoch time using pig reading words.txt file having words.
i need output as
word1_1234567890 word2_1234567890 word3_1234567890
and how can call shell script in pig script
because have written shell script.
any help.
thanks in advance.
mohan.v
use concat combine word epochtime.you can epochtime using tounixtime()
a = load 'words.txt' (word:chararray); b = foreach generate concat(concat(a.word,'_'),(chararray)tounixtime(currenttime()); dump b;
let's shell script names test.sh
%declare my_shell_script 'test.sh' = load 'data.txt' (f1:int,f2:chararray); b = foreach generate '$my_shell_script';
if shell script has parameter param1
%declare my_shell_script 'test.sh $param1' = load 'data.txt' (f1:int,f2:chararray); b = foreach generate '$my_shell_script';
Comments
Post a Comment