Collection of my Scala Hive UDFs
- SBT
- Scala
- Hive
- git clone/fork project https://github.com/lserinol/Hive-udfs.git
- sbt assembly
- add jar 'target/scala-version number/levent-hive-funcs-assembly-version number.jar' to HIVE_AUX_JARS_FILE_PATH
or use "add jar" command for Hive-CLI/Beeline
create temporary function lcrc32 as 'com.levent.hive.udfs.lcrc32';
create temporary function ldays_between as 'com.levent.hive.udfs.ldays_between';
create temporary function lmonths_between as 'com.levent.hive.udfs.lmonths_between';
create temporary function ilike as 'com.levent.hive.udfs.liLIKE';
create temporary function urldecode as 'com.levent.hive.udfs.lurlDecode';
create temporary function urlencode as 'com.levent.hive.udfs.lurlEncode';
- takes a string input and returns crc32(long) value
- calculates days difference between two dates and returns number of days(int) value
- calculates months difference between two dates and returns number of months(int) value
- Hive ilike function in-case sensitive like between two strings returns boolean TRUE/FALSE
- URLDecode - decodes application/x-www-form-urlencoded type into string (UTF-8)
- URLEncode - encodes a string into application/x-www-form-urlencoded type (UTF-8)