Thanks a lot Rekha.

Rekha Joshi wrote:
Replies inline

On 11/27/09 11:21 AM, "V Satish Kumar" <satish.ku...@mkhoj.com> wrote:

Hi Rekhi,

Rekha, actually :-)

I did not quite get this.

I know how to pass a param name and value from command line to pig
scripts and access them. But how do we pass the param name from pig
script to UDF? What will the syntax of the STORE function look like?

something like below
pig command: ... -param CONFIG_FILE='<your_path_here>'..
STORE A in 'somefile' USING MyStorageUDF(CONFIG_FILE);

Thanks,
Satish

Rekha Joshi wrote:
You can send the config files as -params or use -param_file with allconfigs and 
read them as $Config_file1, pass them to the UDF from your pig script.Thanks!


On 11/27/09 10:57 AM, "V Satish Kumar" <satish.ku...@mkhoj.com> wrote:

I have actually written my own UDF to store data. I need to pass a
config file to this UDF. Currently I have hardcoded the config file name
inside the UDF.

Now I want to use the same UDF for various config. Therefore, I wanted
to pass a filename as an argument.

Satish


Rekha Joshi wrote:

By API, PigStorage delimiter needs to be single byte character.For your 
requirement you can possibly extend Utf8StorageConverter/PigStorage.
Or is it possible to parse the file by the byte representation of the your 
string and using with \u? Crazy thought this.., you will have to alter 
functionality.

On 11/27/09 10:31 AM, "V Satish Kumar" <satish.ku...@mkhoj.com> wrote:



Is there a way to pass a string as an argument to the STORE function?
For example: STORE A in 'somefile' USING PigStorage("<STRING>")

Thanks,
Satish




.




.


Reply via email to