|
|
-
Can I use two methods while STORING the output.
kiranprasad 2011-10-13, 10:22
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
-
Re: Can I use two methods while STORING the output.
Gianmarco De Francisci Mo... 2011-10-13, 13:44
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
-
Re: Can I use two methods while STORING the output.
Dmitriy Ryaboy 2011-10-13, 20:05
That doesn't really make sense, much like it doesn't say to store the same file as both a pdf and a word file simultaneously. you only get 1 format for 1 file. You can make two copies, of course, but that's not what you are after here.
What you probably want to do is modify MultiStorage to implement StoreMetadata via JsonSchema (which is what PigStorageSchema does).
D
On Thu, Oct 13, 2011 at 3:22 AM, 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
|
|
All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by
Sematext