Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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
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
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB