请问目前Doris能处理出这样的目标数据吗,sql应该怎么写
-- 表
CREATE TABLE market_1_all(
part_date date,
app_id VARCHAR(16) comment '应用ID',
user_id VARCHAR(16) comment '用户ID',
`channel_ids` JSON comment '渠道素材ID'
) UNIQUE KEY(`part_date`,`app_id`,`user_id`)
DISTRIBUTED BY HASH(`user_id`) BUCKETS 60
PROPERTIES (
"storage_format" = "V2",
"enable_unique_key_merge_on_write" = "true",
"replication_num" = "1"
);
-- 数据
insert into market_1_all values
('2024-08-06','app_id_11','1','[{"id":"11"},{"id":"12"},{"id":"13"}]')
,('2024-08-06','app_id_11','2','[{"id":"21"},{"id":"22"},{"id":"23"}]')
,('2024-08-06','app_id_11','3','[{"id":"31"},{"id":"32"},{"id":"33"}]');
-- 查询
select user_id,channel_ids from market_1_all;
+---------+-------------------------------------------------+
| user_id | channel_ids |
+---------+-------------------------------------------------+
| 1 | [{"id":"11"},{"id":"12"},{"id":"13"}] |
| 2 | [{"id":"21"},{"id":"22"},{"id":"23"}] |
| 3 | [{"id":"31"},{"id":"32"},{"id":"33"}] |
+---------+-------------------------------------------------+
-- 目标表
+---------+----------------+
| user_id | channel_ids |
+---------+----------------+
| 1 | 11 |
| 1 | 12 |
| 1 | 13 |
| 2 | 21 |
| 2 | 22 |
| 2 | 23 |
| 3 | 31 |
| 3 | 32 |
| 3 | 33 |
+---------+----------------+