0

In pig script, I know that we can use passed-in parameters like the following:

%declare CMD `$mycmd $date`
A = load '/data/mydata/$CMD';
B = filter A by $0>'5';

But how can I save the parameters into a file?

Thanks

ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
RhysJ
  • 153
  • 1
  • 3
  • 19
  • what is the case that you want to solve ? – Mzf Feb 21 '16 at 21:04
  • For example, when I set an argument in workflow.xml, say "DATE = 20160220", how to write a pig statement to STORE this DATE value into an output file. – RhysJ Feb 22 '16 at 14:24
  • this is understand - but why do you want to do that ? can you save for each run all the configuration - you can use shell command instead. if you want to add it as column for each one for the record - it should be simple – Mzf Feb 22 '16 at 14:45
  • I just want to record/store the DATE value. Do you know how? – RhysJ Feb 22 '16 at 14:48
  • yes , I mention 2 ways to do that – Mzf Feb 22 '16 at 14:54
  • But I just store this DATE value separately, not with other columns or values – RhysJ Feb 22 '16 at 14:57

0 Answers0