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 E5070606F for ; Fri, 29 Jul 2011 21:32:31 +0000 (UTC) Received: (qmail 82605 invoked by uid 500); 29 Jul 2011 21:32:31 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 82421 invoked by uid 500); 29 Jul 2011 21:32:30 -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 82412 invoked by uid 99); 29 Jul 2011 21:32:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jul 2011 21:32:30 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.138.91.173] (HELO nm13-vm4.bullet.mail.ne1.yahoo.com) (98.138.91.173) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 29 Jul 2011 21:32:24 +0000 Received: from [98.138.90.51] by nm13.bullet.mail.ne1.yahoo.com with NNFMP; 29 Jul 2011 21:32:01 -0000 Received: from [98.138.87.10] by tm4.bullet.mail.ne1.yahoo.com with NNFMP; 29 Jul 2011 21:32:01 -0000 Received: from [127.0.0.1] by omp1010.mail.ne1.yahoo.com with NNFMP; 29 Jul 2011 21:32:01 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 750787.27556.bm@omp1010.mail.ne1.yahoo.com Received: (qmail 3521 invoked by uid 60001); 29 Jul 2011 21:32:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1311975120; bh=ziVPzNyIKgee7xmsTOi56/wbDpZ7U0UH6pljZSsD9Wo=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=TNq40+8xC9kRwvLqmF/yzDyV9bUxGjAHaor2yH1bDCMo7D4xbx7OfAzt8OnXaEJmmrLjoWSs5KgDRgcgzKVZ4t+hBF7+edlC8JBvO0Yvzq0+bDnnaE0Z2pvgf6/r46sCCUDucjII4k7NTq9toMuciBvuJVJTn2t2SV8pkmTK65I= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=iY26+RisvrWJEEJp+Diy8c+y+mhXrbkwrFvxZi1X++inxfOspoxmFtH56V5RkpYmQEGJMSJyOvEi5LwglBUkoM5JjRhhM0TRFdULBmje06DDjsJNlD/TYKjPSrX97sXAjZLK33y6DFQxMvNU+ghFVTjSaoj5KAR3eCsTekf63mc=; X-YMail-OSG: Tya.uqkVM1nBy2PqaFx9RFBVZDJpxwW2amv.X_3CNkEqM7o _Ne3AttSWtCUUmwaEH.XMWvZ_ykMPYe_6PAJZiYZ3iZWWOIne5dp9BsMiutw DbldzrqpY9KYLWU2R1g2aTpmKoEwcbIPa2tIvyQ_qxszU.F5o9t4RhOdMki0 xE3KFOtVCWaE6XZMZ7a4A09i95P6n3BATVRnA3QcpXnWYyBqPkNNSrS_KlDI uylnjdLDXNHtpIoSW5yNBSU5fGat1JnBAegpJ0r_lr.zugqYO1gD_LllaFeo WnU5um2.MvBEFXf3jr.UMG3B_l_Uro_PA8zq5v58M8IHue18aLNAH0UPO6a. orS_nQMfs8vnZJJTjKtg85JbK1VtHFzwil8fhbb42zZBGPd8Notvw77thOBB tvT9YYrbQhdgScVoBIDPKNJmYLkHH9lVDJaiLFQFGLA_Jm6zOjdLn_G.IKFm .46usc.jLvf0z8IO1TTt9YsCHD8sSMc5e8.cfoQP28RMsf1gvT6.XTwyvGCr MRgA3elCHUmA8318ETX22dbwLv.viJCJ28.FgJZMsmEV60y.R3uOIVRjm3VZ Pe_W_VDuSSskr1SgHjQTmKaUz4jHAjmWkR5H.Vv01mtJqPP8DWv5RoBhKq3X S5jRCboa0mfj_y9V7Z62HB69u43YEMBGZYt5TXBztcLmpUXl5TPgvqZszpXJ 11vLLxS0_uNiuxcNzFC8vkR5X0BZIaBA78xQmpUIv3oI1my6CSt4ld_qKEg8 NQm_sy1OT7NJaoSw_BaRhNZeYNo1srmzbknwl3u3hMgWFkli4rCyzyhDIhdF oYxtL0bGjSqnij.52AyT21D90 Received: from [173.164.150.189] by web110516.mail.gq1.yahoo.com via HTTP; Fri, 29 Jul 2011 14:32:00 PDT X-Mailer: YahooMailWebService/0.8.113.313619 References: <1311922786.46897.YahooMailNeo@web110507.mail.gq1.yahoo.com> Message-ID: <1311975120.87086.YahooMailNeo@web110516.mail.gq1.yahoo.com> Date: Fri, 29 Jul 2011 14:32:00 -0700 (PDT) From: Ayon Sinha Reply-To: Ayon Sinha Subject: Re: JsonSerde (+ Thrift?) usage help To: "user@hive.apache.org" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-60512784-1311975120=:87086" --0-60512784-1311975120=:87086 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi Roberto,=0AYes, your JsonSerde was the one I got working last night. My = next question is, do you know of any way to have the Hive Table schema stat= ement (e.g.=A0user_id bigint, details struct> ) =A0generated or imported if I have the Thrift defi= nitions?=0A=0ASince Thrift & Hive are both Facebook originated, I am hoping= there would be a import mechanism that I am yet to discover.=0A=A0=0A-Ayon= =0ASee My Photos on Flickr=0AAlso check out my Blog for answers to commonly= asked questions.=0A=0A=0A=0A________________________________=0AFrom: Rober= to Congiu =0ATo: user@hive.apache.org; Ayon Sinha= =0ASent: Friday, July 29, 2011 10:21 AM=0ASubject: Re= : JsonSerde usage help=0A=0A=0AI think the struct for a struct is correct (= you can see in ObjectInspectorUtils.getStandardStructTypeName() how it is b= uilt).=0A=0AIf you're using this serde:=A0http://code.google.com/p/hive-jso= n-serde/source/browse/trunk/src/org/apache/hadoop/hive/contrib/serde2/JsonS= erde.java, it just doesn't support structs.=0A=0ATry the one I wrote here (= compiled binary under 'downloads'):=A0https://github.com/rcongiu/Hive-JSON-= Serde=0A=0Ait does support structs, even nested like yours.=0AR.=0A=0AOn Th= u, Jul 28, 2011 at 11:59 PM, Ayon Sinha wrote:=0A=0AH= i All,=0A>I can't find any reasonable documentation about being able to use= Serde's.=0A>I have a JSONSerde which I use to create an external table=0A>= create external table scratch.json_serde_test (user_id bigint, details stru= ct > ) row format serde= 'org.apache.hadoop.hive.contrib.serde2.JsonSerde' location '/user/ayon/jso= nserde_test';=0A>=0A>=0A>I can't get any select query to work. What is the = syntax for select inside a struct?=0A>=A0=0A>-Ayon=0A>See My Photos on Flic= kr=0A>Also check out my Blog for answers to commonly asked questions.=0A> --0-60512784-1311975120=:87086 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Roberto,
Yes, your JsonSerde was the one I got working last night. My = next question is, do you know of any way to have the Hive Table schema stat= ement (e.g. user_id bigint, details struct<request_type: int= , more_details: struct<id :bigint>> )  generated or imported = if I have the Thrift definitions?

Since Thrift &am= p; Hive are both Facebook originated, I am hoping there would be a import m= echanism that I am yet to discover.
 = ;
=

From: Roberto Congiu <roberto.congiu@o= penx.com>
To: user@h= ive.apache.org; Ayon Sinha <ayonsinha@yahoo.com>
Sent: Friday, July 29, 2011 10:21 AM
= Subject: Re: JsonSerde usage = help

I think the struct for a struct is correct (you= can see in ObjectInspectorUtils.getStandardStructTypeName() how it is buil= t).
=0A
=0A

=0A

it does support structs, even nested like your= s.
R.

On = Thu, Jul 28, 2011 at 11:59 PM, Ayon Sinha <ayonsinha@yahoo.com> wrote:
=0A=
Hi All,
=0A
<= span>I can't find any reasonable documentation about being able to use Serd= e's.
I have a JSONSerde which I use to create an external = table
=0A=0A=0A=0A=0A=0A=0A=0A
create external table scratch.= json_serde_test (user_id bigint, details struct<request_type: int, more_= details: struct<id :bigint> > ) row format serde 'org.apache.hadoo= p.hive.contrib.serde2.JsonSerde' location '/user/ayon/jsonserde_test';=0A

I can't get any select query to work. What is= the syntax for select inside a struct?
 

=0A


--0-60512784-1311975120=:87086--