Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> Can I use two methods while STORING the output.


+
kiranprasad 2011-10-13, 10:22
Copy link to this message
-
Re: Can I use two methods while STORING the output.
You can issue two different STORE commands with the two different
parameters.
STORE D
USING org.apache.pig.piggybank.storage.MultiStorage('E:/PIGOUTPUT/SL','3',
'none')
STORE D USING org.apache.pig.piggybank.storage.PigStorageSchema()

I think you are also missing an INTO <filename>

Cheers,
--
Gianmarco De Francisci Morales

On Thu, Oct 13, 2011 at 12:22, kiranprasad <[EMAIL PROTECTED]>wrote:

> HI
>
> Can I use 2 methods while STORING the output, If yes how?
>
> Ex:
> REGISTER contrib/piggybank/java/piggybank.jar;
> A= LOAD 'E:/data/June_PAG_Sample.txt' USING PigStorage('|');
> B = GROUP A BY $3;
> C= FOREACH B GENERATE FLATTEN(A);
> D= FOREACH B GENERATE group;
> STORE USING
> org.apache.pig.piggybank.storage.MultiStorage('E:/PIGOUTPUT/SL','3',
> 'none')
> org.apache.pig.piggybank.storage.PigStorageSchema()
>
> Regards
> Kiran.G
+
Dmitriy Ryaboy 2011-10-13, 20:05