udf for hive / impala
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
select UDFDecodeBase64('hive'); -- 加密
select UDFEncodeBase64('aGl2ZQ=='); -- 解密
select geohash(lng,lat)
经纬度转化
-- 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']