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 16441DB48 for ; Wed, 29 Aug 2012 15:31:26 +0000 (UTC) Received: (qmail 88053 invoked by uid 500); 29 Aug 2012 15:31:24 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 88012 invoked by uid 500); 29 Aug 2012 15:31:24 -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 88004 invoked by uid 99); 29 Aug 2012 15:31:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2012 15:31:24 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tombrown52@gmail.com designates 209.85.212.48 as permitted sender) Received: from [209.85.212.48] (HELO mail-vb0-f48.google.com) (209.85.212.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2012 15:31:18 +0000 Received: by vbme21 with SMTP id e21so895479vbm.35 for ; Wed, 29 Aug 2012 08:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=WorIOykk23OgoQca4cplsPFYVSuJHq0w0pD1IXIoEkU=; b=EGuOnPkcj2LijeTa+Ftmjp0HMr9T8fzjR+8GjGzoN6/EczkGYTLfnpdf4UXTqP3ouU Hpdb2TeaZf3t3/XdHoP+ewe2fjus5IBFS0A7aB8LBsQC999YlIJ28jSx65ZRzpQVNfIl o6+JBFsERtd9Ok/OABjxNu8/ROX/toWmDzqR90w2WvgmViS9/HrcbuZ99Up7fBuKoulh e/DSNAyQX3GATW2jtdKpRPRCMhXagi4+gXKUCiNsLMIX4aFk01Zzkg1Q1Knpf8k4KIx7 TPso4Ix/8oRv3M9D4U/eFQjK2dnVt+JeSbQ/HfdycTFvqMNkKgv2Rpv1n3JXZ7PujVvM mvIw== MIME-Version: 1.0 Received: by 10.58.133.48 with SMTP id oz16mr1446330veb.1.1346254257753; Wed, 29 Aug 2012 08:30:57 -0700 (PDT) Received: by 10.52.181.98 with HTTP; Wed, 29 Aug 2012 08:30:57 -0700 (PDT) In-Reply-To: References: Date: Wed, 29 Aug 2012 09:30:57 -0600 Message-ID: Subject: Re: Convert JSON array to Hive array From: Tom Brown To: user@hive.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I believe the "get_json_object" function will be suitable (though I've never personally tried it in the exact context you describe.) https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#Languag= eManualUDF-getjsonobject --Tom On Wed, Aug 29, 2012 at 7:49 AM, Aleksei Udat=C5=A1n=C3=B5i wrote: > I have a Hive column with JSON string like: > > ["9835","29825","73432","51365","14114","6527","779"] > > I want to explode() it and use with the LATERAL VIEW. For that it > needs to be a Hive array. Is there any quick way to convert this > string into a Hive array?