Hi,

 

I believe you can simply use nslookup nnn.nnn.n.n command for this purpose 

 

C:\Users\Admin>nslookup 192.168.8.1

Server:  hi.link

Address:  192.168.8.1

 

Name:    hi.link

Address:  192.168.8.1

 

On a UNIX host it would be pretty easy.

 

HTH,

 

Mich

 

From: Mark Sunderlin [mailto:[email protected]] 
Sent: 05 November 2015 15:35
To: [email protected]
Subject: Re: Hive function to convert numeric IP address to "dot" format?

 

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>
 
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:  <tel:703-265-6935> 703-265-6935 // C:  <tel:540-327-6222> 540-327-6222 // 
22000 AOL Way,  Dulles, VA  20166
AIM: MESunderlin // Slack: @Mark.Sunderlin
Error! Filename not specified.

 

On Thu, Oct 22, 2015 at 2:55 PM, Vikas Parashar <[email protected] 
<mailto:[email protected]> > 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 <[email protected] 
<mailto:[email protected]> > 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_format

dot_format


1661360106

99.6.87.234


1626458677

96.241.202.53

 

--

Mark E. Sunderlin
Data Architect // Data Solutions
P: 703-265-6935 <tel:703-265-6935>  // C: 540-327-6222 <tel:540-327-6222>  // 
22000 AOL Way,  Dulles, VA  20166
AIM: MESunderlin // Slack: @Mark.Sunderlin
Error! Filename not specified.

 

 

Reply via email to