Xkid
Xkid

Reputation: 409

How to Flatten a semicolon Array properly in Azure Data Factory?

Context: I've a data flow that extracts data from SQL DB, when data comes is just one column with a string separated by tab, in order to manipulate the data properly, I've tried to separate every single column with its corresponding data:

Upvotes: 0

Views: 306

Answers (1)

KarthikBhyresh-MT
KarthikBhyresh-MT

Reputation: 5044

You can use the derived column activity itself, try as below.

After the first derived column, what you have is a string array which can just be split again using derived schema modifier.

Where firstc represent the source column equivalent to your column descripcion

Column1: split(firstc, ';')[1]

Column2: split(firstc, ';')[2]

Column3: split(firstc, ';')[3]

enter image description here

Optionally you can select the columns you need to write to SQL sink

enter image description here

enter image description here

Upvotes: 3

Related Questions