Skip to content

Spuul/hive-udfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HIVE UDF

Credits

Modifed from https://github.com/petrabarus/HiveUDFs

Compiling

This project uses Maven, compile it with:

mvn package

Functions

GeoIP2

GeoIP2 uses MaxMinds GeoIP2 Database to retrieve informations from an IP Address. Any V2 database can be used, paid or lite.

Usage:

ADD JAR hive-udf.jar;
ADD FILE GeoIP2-Country.mmdb;
CREATE TEMPORARY FUNCTION geoip as 'com.spuul.hive.GeoIP2';
SELECT geoip('8.8.8.8','COUNTRY_NAME','./GeoIP2-Country.mmdb');

####FUNC(String ip, String dataType, String databasePath)

dataType

Allows you to retrive a specific information from the database. The wanted information needs to be available in the used database. You can't retrieve an city information from a country database.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages