select tb1.apply_Id, group_concat( cast( tb2.user_id as string ) ) new_current_userId, group_concat( tb2.staff_name ) new_current_username from ( select apply_id, userid from dwd.dwd_idmp_hr_sys_apply_info_di lateral view explode_split(split_part(current_userId, ':', 2), ',') tmp1 as userid ) tb1 left join ( select * from dim.dim_idmp_hr_staff_info_dd where date_value = 20230403 ) tb2 on tb1.userid = tb2.user_id group by tb1.apply_Id 要处理的数据类型:
处理后的结果: