Bob
Bob

Reputation: 661

How can I convert a string to a map in Azure Data Factory/Synapse Data Flow?

I have a string column in a parquet file:-

{"name":"bob","age":"35"}

I need to create separate columns for each data item.

How can I achieve this? Can I convert the string to a map or parse directly to columns?

Upvotes: 1

Views: 876

Answers (1)

Joseph  Xu
Joseph Xu

Reputation: 6073

We can use Parse transformation in mapping data flow to achieve that.

  1. Select Single document as Document form. Select Column_1, enter Column_1 as column name, enter (name as string,age as integer) as Output column type:
    enter image description here

  2. Data preview is as follows: enter image description here

Upvotes: 1

Related Questions