hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamie Olson <jamie.f.ol...@gmail.com>
Subject Re: TRANSFORM + LATERAL VIEW?
Date Wed, 07 Nov 2012 17:41:17 GMT
Thanks.  I was just using cat as an example.  I'm actually running some R
scripts over TRANSFORM.  So I'll just have to manually JOIN the results
with the original table (or just append the new columns in the TRANSFORM
script).

Jamie Olson



On Wed, Nov 7, 2012 at 1:04 AM, Mark Grover <grover.markgrover@gmail.com>wrote:

> 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 <jamie.f.olson@gmail.com>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
>>
>>
>

Mime
View raw message