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

Switch to Plain View
Pig >> mail # user >> pass relation value to the file path of store command


+
soniya B 2013-11-18, 02:01
+
Ruslan Al-Fakikh 2013-11-18, 10:21
Copy link to this message
-
Re: pass relation value to the file path of store command
Maybe it's better to try bucketed hive table?
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL+BucketedTables
2013/11/18 Ruslan Al-Fakikh <[EMAIL PROTECTED]>

> Hi soniya,
>
> In you example you are hard-coding the ID to 2 in your filter statement.
> You could also hard-code it in STORE:
> Store A into '/main/abc'/2 ;
> If you want to separate the rows by a value of a field then you could try
> MultiStorage from piggybank.
>
> Thanks
>
>
> On Mon, Nov 18, 2013 at 6:01 AM, soniya B <[EMAIL PROTECTED]>
> wrote:
>
> > Hi friends,
> >
> > I have a sample script below
> >
> > AA = ....
> > A= filter AA by ID = 2;
> > B= foreach A generate ID,name,description;
> > Store A into '/main/abc' ;
> >
> >
> > I want to store the ID value in the end of filepath. i.e  'main/abc/ID' .
> >
> > here, i have to get filepath as '/main/abc/2' .
> >
> > Could you please help me? if is not possible in pig latin then how to do
> it
> > in the shell script?
> >
> > Thanks
> > Soniya
> >
>
+
Gaurav Pandit 2013-11-19, 06:18