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
Hive >> mail # user >> TRANSFORM + LATERAL VIEW?


Copy link to this message
-
Re: TRANSFORM + LATERAL VIEW?
Jamie,
Not that I know of.

Assuming you will be using LATERAL VIEW for exploding the data, I can think
of 2 options at the top of my head:
1. Pass 'id' column to your transform script. You will have to take care of
the exploding data in your transform script. It would no longer be a simple
'cat'.
2. Return an array of entries from your Transform script. Consequently, use
explode/lateral view on this array to achieve the desired result. The
transform script will no longer be a cat, in this case too.

Hope that helps. Let us know how it goes.

Mark

On Mon, Nov 5, 2012 at 11:32 PM, Jamie Olson <[EMAIL PROTECTED]>wrote:

> Is it possible to select columns not in the TRANSFORM(...) operation?  I
> did not see anywhere in the language definition for transform.  I'm looking
> for something comparable to LATERAL VIEW for UDTF but with TRANSFORM
> statements.
>
> Ex: Not (seemingly?) legal:
> FROM (
> FROM xtab dat
> id, TRANSFORM (x, y)
> USING 'cat'
> ) map_out
> INSERT INTO xresult SELECT map_out.*
>
>
> Jamie Olson
>
>
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