You could separate the inner bags, flatten, rank, and join. It would be ugly
and inefficient though. It is best to just write a udf which basically does
what the python’s zip function does.
On Jun 5, 2014, at 1:36 AM, Patcharee Thongtra
wrote:
> Hi,
>
> I have the following data
>
> (2009-09-09,2,1,{(70)},{(80)},{(90)})
> (2010-10-10,2,12,{(71),(75)},{(81),(85)},{(91),(95)})
> (2012-12-12,2,9,{(76),(77),(78)},{(86),(87),(88)},{(96),(97),(98)})
>
> which is in the format
>
> {date: chararray, zone: int, z: int, uTmp: {(varvalue: int)}, vTmp:
> {(varvalue: int)}, thTmp: {(varvalue: int)} }
>
> How can I get:
>
> (2009-09-09,2,1,70,80,90)
> (2010-10-10,2,12,71,81,91)
> (2010-10-10,2,12,75,85,95)
> (2012-12-12,2,9,76,86,96)
> (2012-12-12,2,9,77,87,97)
> (2012-12-12,2,9,78,88,98)
>
> Any suggestion is appreciated.
>
> Patcharee
>
>
>
>