hadoop - Hive : Concat a map -
hadoop - Hive : Concat a map -
i have little problem hive, when seek concatenate map
assume i've :
var 1 | var 2 x | map(key1:value1) x | map(key2:value2) x | map(key3:value3) y | map(key4:value4)
what i'am trying get, it's
var 1 | var 2 x | map(key1:value1 ; key2:value2; key3:value3) y | map(key4,value4)
something map concatenation.
how can proceed whith hive ?
use query...
select var1,collect_set(concat_ws(',',map_keys(var2),map_values(var2))) var2 illustration grouping var1;
this output this...
var1 | var2x | ["key1,value1","key2,value2","key3,value3"]
y | ["key4,value4"]
hadoop hive hql
Comments
Post a Comment