Skip to content

livolleyball/BigdataUdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BigdataUdf

udf for hive / impala

H3

CREATE  temporary FUNCTION h3encode AS 'com.hive.udf.h3.UDFH3Encode'
using jar 'hdfs://nameservice1:8020/user/hadoop/udf/BigdataUdf-1.0-SNAPSHOT-jar-with-dependencies.jar';

CREATE  temporary FUNCTION h3kring AS 'com.hive.udf.h3.GenericUDFH3kRing'
using jar 'hdfs://nameservice1:8020/user/hadoop/udf/BigdataUdf-1.0-SNAPSHOT-jar-with-dependencies.jar';

select longitude,latitude ,k 
from oyo_dw.dim_hotel t
lateral view explode(h3kring(h3encode(longitude,latitude,6),1))  tf as k

base64 加密/解密

select UDFDecodeBase64('hive');      -- 加密
select UDFEncodeBase64('aGl2ZQ==');  -- 解密

geohash

select geohash(lng,lat)

geo

经纬度转化

charutil

-- full_to_halfwidth
select full2halfwidth("814乡道阿斯蒂芬123/.12,412看2家1快2看了就2;看了2叫看来");

-- 字符拆分
select split_word_by_type('  shell类型的 ? 123 78号楼 809 ')['cn'],
split_word_by_type('  shell类型的 ? 123 78号楼 809 ')['en'],
split_word_by_type('  shell类型的 ? 123 78号楼 809 ')['num']

About

udf for hive , impala ,presto

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages