Skip to content

growthfield/hive0.7.0_sample_aggregate_concatnation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Aggregate concatnation with sorting

HiveのUDAF勉強用サンプル。 Oracle 10gの隠し関数 wm_concatや、11gのLISTAGG相当のHive UDAFです。

hive> add jar /path/to/listagg-1.0.jar
hive> create temporary function listagg as 'jp.growthfield.hive.udaf.GenericUDAFListAgg';
hive> select id, listagg(value_col, sort_col) from foo_table group by id;

第一引数であるvalue_colカラムの値をカンマ区切りの文字列として出力します。 第二引数は任意で、指定するとその値でソートをします。

About

Sample hive UADF function for aggregate concatnation with sorting

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages