-- then all the following constants reference will be replaced in runtimestore Result into $$store_location using PigStorage(',');

so, in this way, we just write the template scripts and import them with the constants defined. A commonly use case is use it to compute data for different days. Without this feature, I have to use sed to replace the variables on the template script to generate the daily pig scripts. How do you guy think so?Haitao Yao[EMAIL PROTECTED]weibo: @haitao_yaoSkype: haitao.yao.final

> Hi, all> I got an idea about a new feature for pig: define global constants> in pig script.> Here's the example like this:>> -- define a global constant for storage> define store_location "/where_you_store_result";>> -- then all the following constants reference will be replaced in runtime> store Result into $$store_location using PigStorage(',');>>> so, in this way, we just write the template scripts and import> them with the constants defined. A commonly use case is use it to compute> data for different days.> Without this feature, I have to use sed to replace the variables> on the template script to generate the daily pig scripts.> How do you guy think so?>>> Haitao Yao> [EMAIL PROTECTED]> weibo: @haitao_yao> Skype: haitao.yao.final>>

> Pig already has this! :)> http://pig.apache.org/docs/r0.10.0/cont.html#parameter-sub> > Unless I'm really misunderstanding what you mean?> > 2012/7/26 Haitao Yao <[EMAIL PROTECTED]>> >> Hi, all>> I got an idea about a new feature for pig: define global constants>> in pig script.>> Here's the example like this:>> >> -- define a global constant for storage>> define store_location "/where_you_store_result";>> >> -- then all the following constants reference will be replaced in runtime>> store Result into $$store_location using PigStorage(',');>> >> >> so, in this way, we just write the template scripts and import>> them with the constants defined. A commonly use case is use it to compute>> data for different days.>> Without this feature, I have to use sed to replace the variables>> on the template script to generate the daily pig scripts.>> How do you guy think so?>> >> >> Haitao Yao>> [EMAIL PROTECTED]>> weibo: @haitao_yao>> Skype: haitao.yao.final>> >>

NEW: Monitor These Apps!

All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by Sematext