像这样创建表:
create table xxx:
(
user_id bigint comment '',
order_count map<string,string> comment ''
) comment ''
PARTITIONED BY (`partition_date` string comment "")
row format delimited fields terminated by '\t' collection items
terminated by ',' map keys terminated by ':' lines terminated by '\n'
inser sql this:
str_to_map(concat_ws(",",collect_set(concat_ws(':', datetime_type, cast(order_count as string)))),',',':')
当选择显示时:
{"30d=2","365d"=3,"60d"="3","90d"="3","180d"="3"}
我为每个K-V对指定了分隔符“:”,但是为什么仍显示默认分隔符“ =”
以及如何表现像
{"30d:2","365d":3,"60d":"3","90d":"3","180d":"3"}
谢谢。