RE: Converting rows into dynamic colums in Hive

2012-08-16 Thread richin.jain
You could do it using Pivot table in MS Excel. It's under the Insert tab, first option on the left. Richin -Original Message- From: Jain Richin (Nokia-LC/Boston) Sent: Thursday, August 09, 2012 4:16 PM To: user@hive.apache.org Subject: RE: Converting rows into dynamic colums in

RE: Converting rows into dynamic colums in Hive

2012-08-09 Thread richin.jain
Subject: Re: Converting rows into dynamic colums in Hive R is another programming language geared to statistical analysis. It has some features that make it easy to write this sort of data manipulation. http://www.r-project.org/ Here's a sample R function that does something similar to wha

Re: Converting rows into dynamic colums in Hive

2012-08-09 Thread John Meagher
On Wed, Aug 8, 2012 at 8:58 PM, wrote: > John, > > What is R? > > -Original Message- > From: ext John Meagher [mailto:john.meag...@gmail.com] > Sent: Wednesday, August 08, 2012 4:34 PM > To: user@hive.apache.org > Subject: Re: Converting rows into dynamic colum

RE: Converting rows into dynamic colums in Hive

2012-08-08 Thread richin.jain
John, What is R? -Original Message- From: ext John Meagher [mailto:john.meag...@gmail.com] Sent: Wednesday, August 08, 2012 4:34 PM To: user@hive.apache.org Subject: Re: Converting rows into dynamic colums in Hive I don't think having dynamic columns is possible in Hive. I'

Re: Converting rows into dynamic colums in Hive

2012-08-08 Thread John Meagher
t; To: user@hive.apache.org > Subject: Re: Converting rows into dynamic colums in Hive > > > > you should be able to do this in hive using a group by on alpha and then > using a combination of the max and if statement... something on the > following lines > > select alpha,

RE: Converting rows into dynamic colums in Hive

2012-08-08 Thread richin.jain
@hive.apache.org Subject: Re: Converting rows into dynamic colums in Hive you should be able to do this in hive using a group by on alpha and then using a combination of the max and if statement... something on the following lines select alpha, max(abc), max(pqr), ... ( select alpha, if (beta

Re: Converting rows into dynamic colums in Hive

2012-08-07 Thread Ashish Thusoo
you should be able to do this in hive using a group by on alpha and then using a combination of the max and if statement... something on the following lines select alpha, max(abc), max(pqr), ... ( select alpha, if (beta == 'abc', Gamma, NULL) as abc, if (beta == 'pqr', Gamma, NUL) as pqr,

RE: Converting rows into dynamic colums in Hive

2012-08-07 Thread Raghunath, Ranjith
You can do this using case statements and summing the values. The only item to remember here is that the values in the grid need to be numeric for the sum to work. Thanks, Ranjith From: richin.j...@nokia.com [mailto:richin.j...@nokia.com] Sent: Tuesday, August 07, 2012 3:58 PM To: user@hive.apa