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

Switch to Threaded View
Pig >> mail # user >> How to create an empty alias


Copy link to this message
-
RE: How to create an empty alias

Just tell us what issue you are facing and what output do you want?

give a demo data and tell what kind of output you want.

Instead of posting query post the demo data and what outcome you do want..

Regards
Yogesh Kumar

> Date: Tue, 6 Nov 2012 23:04:15 -0500
> Subject: Re: How to create an empty alias
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
>
> Sorry, for late response. In case you still need this.
> You can try to read from file:/dev/null
> This should work for most formats.
>
> 2012/10/18 Kevin LION <[EMAIL PROTECTED]>
>
> > Hello,
> >
> > I've a script which group lot of alias and is doing some operation on it.
> > But it can happen that I don't need one of this alias. To don't change my
> > code, I would like to create an empty alias. How can I do that ?
> >
> > Actually my code is like that :
> > A = LOAD A AS (id, a1, a2);
> > B = LOAD A AS (id, b1, b2);
> > C = LOAD A AS (id, c1, c2);
> > GROUP = COGROUP A BY id, B BY id, C BY id;
> > GROUP2 = FOREACH GROUP GENERATE TOTUPLE(A, B, C) AS ALL;
> > OPERATION = FOREACH GROUP2 GENERATE MyUDF(ALL);
> >
> > And I would like to do something like that :
> > A = LOAD A AS (id, a1, a2);
> > B = LOAD A AS (id, b1, b2);
> > *C = LOAD NULL AS (id, c1, c2); <- Generate an empty alias with column id,
> > c1, c2;*
> > GROUP = COGROUP A BY id, B BY id, C BY id;
> > GROUP2 = FOREACH GROUP GENERATE TOTUPLE(A, B, C) AS ALL;
> > OPERATION = FOREACH GROUP2 GENERATE MyUDF(ALL);
> >
> --
> Best regards,
>  Vitalii Tymchyshyn