将活动数据工厂V2集合参考复制到字符串类型

时间:2020-10-28 23:14:56

标签: json azure azure-data-factory-2 azure-data-factory-pipeline azure-data-flow

我正在尝试使用Data Factory V2将Json文件加载到SQL Server。需要将集合类型为数组的引用保存到SQL Server中的字符串。在下图中,“字段”对象由多个字段组成。我需要将对象“关键字”存储为映射到单列的SQL Server DB中的字符串类型。我无法将“关键字”或“字段”映射到列

enter image description here

1 个答案:

答案 0 :(得分:0)

在数据工厂中,我们无法在SQL Server中将json数据.one { border:1px solid black; background:red; position:relative; z-index:5 } .two { background:green; position:relative; } .three { position:relative; } 数组作为json字符串加载到每一列的每一行。

我们能想到的是将所有json数据加载到SQL Server中的一行。

但这是一种非常规的方式:

  1. 将json文件设置为Delimiter文件格式。
  2. 使用不存在的字符设置列和行分隔符 在文件中。
  3. 然后json数据将被视为像下面这样的json字符串:

enter image description here

SQL数据库中的输出: enter image description here