Reply
rio
Explorer
Posts: 48
Registered: ‎04-18-2014

Implementing Hive UDF?

Hello,

 

I have a hive table with ip_address column. How can I find country, city and Zip code from that ip_address column?

 

I see a udf written:

https://github.com/edwardcapriolo/hive-geoip

 

Where do I get these Jar files from? 

 

geo-ip-java.jar;

hive-udf-geo-ip-jtg.jar;

 

The udf says we need separate database:

http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz

I got the database from above URL

 

Any feedback will be appreciated.

 

Thanks,

Rio