Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 53DF7979D for ; Tue, 7 Aug 2012 20:58:46 +0000 (UTC) Received: (qmail 25895 invoked by uid 500); 7 Aug 2012 20:58:45 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 25840 invoked by uid 500); 7 Aug 2012 20:58:45 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 25832 invoked by uid 99); 7 Aug 2012 20:58:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2012 20:58:45 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of richin.jain@nokia.com designates 147.243.1.47 as permitted sender) Received: from [147.243.1.47] (HELO mgw-sa01.nokia.com) (147.243.1.47) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2012 20:58:35 +0000 Received: from vaebh102.NOE.Nokia.com (vaebh102.europe.nokia.com [10.160.244.23]) by mgw-sa01.nokia.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q77KwDwA001386 for ; Tue, 7 Aug 2012 23:58:13 +0300 Received: from smtp.mgd.nokia.com ([65.54.30.60]) by vaebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 7 Aug 2012 23:59:08 +0300 Received: from 008-AM1MPN1-073.mgdnok.nokia.com ([169.254.3.161]) by 008-AM1MMR1-005.mgdnok.nokia.com ([65.54.30.60]) with mapi id 14.02.0283.004; Tue, 7 Aug 2012 22:58:00 +0200 From: To: Subject: Converting rows into dynamic colums in Hive Thread-Topic: Converting rows into dynamic colums in Hive Thread-Index: Ac1031HJ+FhwIj1dTl6H6GPM9KxqCQ== Date: Tue, 7 Aug 2012 20:57:59 +0000 Message-ID: <2AD0F14A76338B4FA3C06F5BA1C1D2DB043E89E7@008-AM1MPN1-073.mgdnok.nokia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-headerinfofordlp: None x-titus-version: 3.3.8.1 x-tituslabs-classifications-30: TLPropertyRoot=Nokia;Confidentiality=Nokia Internal Use Only;Project=None; x-tituslabs-classificationhash-30: wMRUUUZB6NdpUEshuhzL9QbCYm/e5VqlOLNaAHqpDo9RykIM+P1aOeze5HKOh0cOojldpmPRCksOEw0MRoZ0oJ1zFJ5G0SgW0+qMMkZUD/tnZgmYhmkTk9vJUNbMuWc25gT1nJuGYOWz0sc4oNJHe4o4ExenMmdSo4zXpaTvMoWMpCfJvUSp5Kbum1+nzN6d0wtOIeTteAeXt6kyCwJeBBMuSnWHfoCnoEjCPl8EJGwbhzFZXN01ySFEVXuxdNT6 x-originating-ip: [10.163.121.210] Content-Type: multipart/alternative; boundary="_000_2AD0F14A76338B4FA3C06F5BA1C1D2DB043E89E7008AM1MPN1073mg_" MIME-Version: 1.0 X-OriginalArrivalTime: 07 Aug 2012 20:59:08.0116 (UTC) FILETIME=[7CA26940:01CD74DF] X-Nokia-AV: Clean --_000_2AD0F14A76338B4FA3C06F5BA1C1D2DB043E89E7008AM1MPN1073mg_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi All, One of my Query output looks like- Alpha Beta Gamma 123 xyz 1.0 123 abc 0.5 123 pqr 1.3 123 def 2.1 456 xyz 0.1 456 abc 0.6 456 pqr 1.9 456 def 3.2 456 lmn 1.1 456 sdf 1.2 I want the output for the data visualization purpose to look like (basicall= y taking rows from one table and making it column in another table) Alpha xyz abc pqr def lm= n sdf 123 1.0 0.5 1.3 2.1 456 0.1 0.6 1.9 3.2 = 1.1 1.2 Question - Can it be done in Hive? If not, any suggestions. Thanks, Richin --_000_2AD0F14A76338B4FA3C06F5BA1C1D2DB043E89E7008AM1MPN1073mg_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi All,

 

One of my Query output looks like-

 

Alpha       &n= bsp;            Beta=             &nb= sp;          Gamma<= /b>

123        &= nbsp;           &nbs= p;    xyz        &nb= sp;            =     1.0

123        &= nbsp;           &nbs= p;    abc        &nb= sp;            =     0.5

123        &= nbsp;           &nbs= p;    pqr        &nb= sp;            =     1.3

123        &= nbsp;           &nbs= p;    def        &nb= sp;            =     2.1

456       &nbs= p;            &= nbsp;    xyz        =             &nb= sp;    0.1

456       &nbs= p;            &= nbsp;    abc        =             &nb= sp;    0.6

456       &nbs= p;            &= nbsp;    pqr        =             &nb= sp;    1.9

456       &nbs= p;            &= nbsp;    def        =             &nb= sp;    3.2

456       &nbs= p;            &= nbsp;    lmn        =             &nb= sp;   1.1

456       &nbs= p;            &= nbsp;    sdf        =             &nb= sp;     1.2

 

I want the output for the data visualization purpose= to look like (basically taking rows from one table and making it column in= another table)

 

Alpha       &n= bsp;            xyz&= nbsp;        abc    =      pqr        = ; def         lmn   =      sdf        = ; 

123        &= nbsp;           &nbs= p;    1.0        &nb= sp; 0.5          1.3 &nbs= p;        2.1    &nb= sp;             = ;             &= nbsp;         

456        &= nbsp;           &nbs= p;    0.1        &nb= sp; 0.6          1.9 &nbs= p;        3.2    &nb= sp;     1.1       &n= bsp;  1.2

 

Question – Can it be done in Hive? If not, any= suggestions.

 

Thanks,

Richin

 

 

--_000_2AD0F14A76338B4FA3C06F5BA1C1D2DB043E89E7008AM1MPN1073mg_--