hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martijn van Leeuwen <>
Subject Combine multiple row values based upon a condition.
Date Sat, 02 Feb 2013 19:21:08 GMT
Hi all,

I new to Apache Hive and I am doing some test to see if it fits my needs, one of the questions
I have if it is possible to "peek" for the next row in order to find out if the values should
be combined. Let me explain by an example.

Let say my data looks like this

Id name offset
1 Jan 100
2 Janssen 104
3 Klaas 150
4 Jan 160
5 Janssen 164

An my output to another table should be this

Id fullname offsets
1 Jan Janssen [ 100, 160 ]

I would like to combine the name values from two rows where the offset of the two rows are
no more then 1 character apart.

Is this type of data manipulation is possible and if it is could someone point me to the right
direction hopefully with some explaination?

Kind regards
View raw message