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 9B6D618827 for ; Thu, 5 Nov 2015 15:51:25 +0000 (UTC) Received: (qmail 49049 invoked by uid 500); 5 Nov 2015 15:51:24 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 48971 invoked by uid 500); 5 Nov 2015 15:51: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 48961 invoked by uid 99); 5 Nov 2015 15:51:24 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Nov 2015 15:51:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 94EAB1A4195 for ; Thu, 5 Nov 2015 15:51:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.901 X-Spam-Level: ** X-Spam-Status: No, score=2.901 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id JzkYfGxBRnKh for ; Thu, 5 Nov 2015 15:51:09 +0000 (UTC) Received: from mail-ig0-f178.google.com (mail-ig0-f178.google.com [209.85.213.178]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id EFD1120F6E for ; Thu, 5 Nov 2015 15:51:08 +0000 (UTC) Received: by igpw7 with SMTP id w7so14626649igp.0 for ; Thu, 05 Nov 2015 07:51:08 -0800 (PST) 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; bh=78KDY4Nd+D47yhySJW6J38WKmM1SC9C8wCDBiKqtGyg=; b=Q1seba8AHYqBu8YtEaAf9W6nBvalnJJf9HI9JzAmLz4YXQO8ogXFCBP5k1Mjhtp6iT Ip0RVQcRSH3uvM7lB+lwvMolc/AKHKRqIeML7er9oVx2s793rGH9DLERT/94Q/XX9+Kl 4PH9CgPM3pD/qOmnBMYvv5qrqz4YJNRi76625V1yeDMnXDkYvvfVkTUJl2E3vulumckx pa0NhXTyXh2CGU4P6u1GlwLDe+csNXrawSUGiPoziHEB0XYV1RDGk5hw4VRCvVqJgYOL 9k0gJxZTGA2Lp314Dw7yxA3wxW4WcJmKd8Kn8O1IGDzHj2/gimnDcxchrxWLnwL2UZVd lx4Q== MIME-Version: 1.0 X-Received: by 10.50.112.230 with SMTP id it6mr954767igb.32.1446738668384; Thu, 05 Nov 2015 07:51:08 -0800 (PST) Received: by 10.107.63.131 with HTTP; Thu, 5 Nov 2015 07:51:08 -0800 (PST) In-Reply-To: References: Date: Thu, 5 Nov 2015 21:21:08 +0530 Message-ID: Subject: Re: Hive function to convert numeric IP address to "dot" format? From: Vikas Parashar To: user@hive.apache.org Content-Type: multipart/alternative; boundary=089e0122ad8a6994160523cd1859 --089e0122ad8a6994160523cd1859 Content-Type: text/plain; charset=UTF-8 Thanks Mark Ohh, that was long to ip conversion. I thought, ip (dots) has been removed some where. Love to hear from you. Cheers On Thu, Nov 5, 2015 at 9:05 PM, Mark Sunderlin wrote: > Actually, I found a UDF that does this very nicely! > > > https://github.com/petrabarus/HiveUDFs/blob/master/src/main/java/net/petrabarus/hiveudfs/LongToIP.java > > Share and enjoy! > > -- > Mark E. Sunderlin > Data Architect // Data Solutions > P: 703-265-6935 // C: 540-327-6222 // 22000 AOL Way, Dulles, VA 20166 > AIM: MESunderlin // Slack: @Mark.Sunderlin > > On Thu, Oct 22, 2015 at 2:55 PM, Vikas Parashar > wrote: > >> Hi Mark, >> >> You can segregate it at the input level. Could you please explain how >> your data are ingesting in DB. >> >> On Fri, Oct 23, 2015 at 12:14 AM, Mark Sunderlin < >> mark.sunderlin@teamaol.com> wrote: >> >>> Does hive have a built in function to return a dotted-quad >>> representation of an IP address given a network address as an integer >>> as input? >>> >>> If not, does anyone have SQL they would be willing to share that does >>> this? >>> >>> What I am looking for: My data is in the below "raw" format, I want it >>> in the "dot" format. >>> >>> raw_formatdot_format166136010699.6.87.234162645867796.241.202.53 >>> >>> -- >>> Mark E. Sunderlin >>> Data Architect // Data Solutions >>> P: 703-265-6935 // C: 540-327-6222 // 22000 AOL Way, Dulles, VA 20166 >>> AIM: MESunderlin // Slack: @Mark.Sunderlin >>> >>> >>> >> > --089e0122ad8a6994160523cd1859 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Mark=C2=A0

Ohh, that was long to= ip conversion. I thought, ip (dots) has been removed some where.=C2=A0

Love to hear from you.

Cheer= s

On T= hu, Nov 5, 2015 at 9:05 PM, Mark Sunderlin <mark.sunderlin@teamao= l.com> wrote:
A= ctually, I found a UDF that does this very nicely!


<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">Share = and enjoy!

<= div dir=3D"ltr" style=3D"font-size:12.8px">--
Mark E. Sunderlin
Data Architect // Data Sol= utions
P:=C2=A0703-265-6935=C2=A0// C:=C2= =A0540-327-6222=C2=A0// 22000 AOL Way,=C2=A0 = Dulles, VA=C2=A0 20166
AIM: MESunderlin // Slack: @Mark.Sunderlin
3D""

On Thu, Oct 22= , 2015 at 2:55 PM, Vikas Parashar <para.vikas@gmail.com> = wrote:
Hi Mark,=C2=A0
You can segregate it at the input level. Could you please = explain how your data are ingesting in DB.

On Fri, Oct 23, 2015 at 12:= 14 AM, Mark Sunderlin <mark.sunderlin@teamaol.com> = wrote:
Does hive= have a built in function to return a dotted-quad representation of an IP address =C2=A0given a network address as an integer as input?
=
If not, does = anyone have SQL they would be willing to share that does this?=

What I am looking for: My dat= a is in the below "raw" format, I =C2=A0want it in the "dot&= quot; format.

raw_formatdot_format
166136010699.6.87.234
1626458677<= /td>96.241.202.53

<= div>
--
Mark E. Sunderlin
Data= Architect // Data Solutions
P: 703-265-6935 // C: 540-327-6222 // 22000 A= OL Way,=C2=A0 Dulles, VA=C2=A0 20166
AIM: MESunderlin // Sl= ack: @Mark.Sunderlin
3D""

=



--089e0122ad8a6994160523cd1859--