如何在 Azure 数据工厂/突触数据流中将字符串转换为映射?

问题描述

我在镶木地板文件中有一个字符串列:-

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

我需要为每个数据项创建单独的列。

我怎样才能做到这一点?我可以将字符串转换为映射或直接解析为列吗?

解决方法

我们可以使用 Parse transformation in mapping data flow 来实现这一点。

  1. 选择单个文档作为文档表单。选择Column_1,输入Column_1作为列名,输入(name as string,age as integer)作为输出列类型:
    enter image description here

  2. 数据预览如下: enter image description here