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 8089497C9 for ; Thu, 9 Feb 2012 13:39:16 +0000 (UTC) Received: (qmail 78175 invoked by uid 500); 9 Feb 2012 13:39:15 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 78105 invoked by uid 500); 9 Feb 2012 13:39:14 -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 78097 invoked by uid 99); 9 Feb 2012 13:39:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 13:39:14 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Matt.Tucker@disney.com designates 192.195.66.26 as permitted sender) Received: from [192.195.66.26] (HELO msg11.disney.com) (192.195.66.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 13:39:03 +0000 Received: from int11.disney.pvt (int11.disney.pvt [153.6.62.222]) by msg11.disney.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id q19Dcfo8019056; Thu, 9 Feb 2012 13:38:41 GMT Received: from SM-FLOR-XHT04.wdw.disney.com (sm-flor-xht04.wdw.disney.com [153.6.190.80]) by int11.disney.pvt (Switch-3.4.4/Switch-3.4.4) with ESMTP id q19Dcd7P008003 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 9 Feb 2012 13:38:39 GMT Received: from sm-flor-vxmb06b.wdw.disney.com ([fe80::1c05:28bc:5b5a:5883]) by SM-FLOR-XHT04.wdw.disney.com ([2002:9906:be38::9906:be38]) with mapi; Thu, 9 Feb 2012 08:38:39 -0500 From: "Tucker, Matt" To: "user@hive.apache.org" , Hao Cheng Date: Thu, 9 Feb 2012 08:37:40 -0500 Subject: RE: Delimiters for nested structures Thread-Topic: Delimiters for nested structures Thread-Index: Aczm8mmwGkoiafPDQ4avtfgt6PQOcQAPMkdA Message-ID: <4CED3A5A427FF34BAEE89C98D64D336D1F872B16B7@SM-FLOR-VXMB06B.wdw.disney.com> References: <1328768108.41885.YahooMailNeo@web112812.mail.gq1.yahoo.com> In-Reply-To: <1328768108.41885.YahooMailNeo@web112812.mail.gq1.yahoo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_4CED3A5A427FF34BAEE89C98D64D336D1F872B16B7SMFLORVXMB06B_" MIME-Version: 1.0 X-Source-IP: sm-flor-xht04.wdw.disney.com [153.6.190.80] X-Virus-Checked: Checked by ClamAV on apache.org --_000_4CED3A5A427FF34BAEE89C98D64D336D1F872B16B7SMFLORVXMB06B_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable What about creating a view that converts your data into JSON or XML? You c= an then make use of the get_json_object() or xpath() functions. Matt Tucker From: Hao Cheng [mailto:haoc.cheng@yahoo.com] Sent: Thursday, February 09, 2012 1:15 AM To: user@hive.apache.org Subject: Delimiters for nested structures Hi, My data have some map of map structures with customized delimiters. As per Hive documents, by default, '\001' is the field separator; starting = from '\002', every 2 consecutive characters are the delimiters of 1 level. = My data do not follow this rule in term of delimiters. I mostly just need t= o handle map of map. I do not find a way in create table statement to redef= ine delimiters for more than 1 level nested structures. I try not to transf= orm the data as it was produced by some other upstream process. Any ideas on how to do that in Hive? Thank you for your helps! Regards, Hao --_000_4CED3A5A427FF34BAEE89C98D64D336D1F872B16B7SMFLORVXMB06B_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

What abou= t creating a view that converts your data into JSON or XML?  You can t= hen make use of the get_json_object() or xpath()= functions.

 

Matt Tucker

 

From: Hao Cheng [mailto:haoc.cheng@yahoo.com]
= Sent: Thursday, February 09, 2012 1:15 AM
To: user@hive.ap= ache.org
Subject: Delimiters for nested structures

 

Hi,=

 

M= y data have some map of map structures with customized delimiters.

As per Hive documents, by default, '\001' is the f= ield separator; starting from '\002', every 2 consecutive characters are th= e delimiters of 1 level. My data do not follow this rule in term of delimit= ers. I mostly just need to handle map of map. I do not find a way in create= table statement to redefine delimiters for more than 1 level nested struct= ures. I try not to transform the data as it was produced by some other upst= ream process.

Any ideas on how to do th= at in Hive? Thank you for your helps!

 

Regards,

Hao

= --_000_4CED3A5A427FF34BAEE89C98D64D336D1F872B16B7SMFLORVXMB06B_--