daniel_sahal
Databricks MVP

@Jay Yang​ 

You can use a combination of array_join and collect_list. See example below.

Source table:

imageAfter transformation:

image