cancel
Showing results for 
Search instead for 
Did you mean: 

Challenge #9 How to Split a string data value using a delimiter into multiple rows in a data column.

Rasha
Employee
Employee

Hello Incorta fans,

Given a data set as below:

Rasha_2-1690743732575.png

the data source is attached: Group_split_Test.csv 

It has  a column named value that contains a comma-separated data value grouped by a column namedKey , And it is required to split this single data into multiple rows for each key value.

It should be like that:

Rasha_3-1690743984072.png

Please help me to achieve it 🤷‍ 😀.

1 REPLY 1

Medhat91
Employee
Employee

Thanks Rasha, 

I found another solution also for splitting data , by sql function ..here is it he function:

SELECT explode(split(col1, ",")) FROM table

try it it works with me.