【发布时间】:2023-03-06 08:17:02
【问题描述】:
我有一个蜂巢表
create table mySource(
col_1 map<string, string>,
col_2 map<string, string>
)
这是记录的样子
col_1 col_2
{"a":1, "b":"2"} {"c":3, "d":"4"}
我的目标表是这样的
create table myTarget(
my_col map<string, string>
)
现在我想将 mySource 中的两列合并到一个地图中,并将其提供给我的目标表。基本上我想写类似的东西
insert into myTarget
select
some_method(col_1, col_2) as my_col
from mySource;
hive 中是否有内置方法可以做到这一点?我用 collect_set 尝试了一些东西,但出现了很多错误
【问题讨论】:
标签: java dictionary hive hiveql hive-udf