数据工厂:API 调用返回 JSON 格式不会转到 JSON 文件

Data Factory: API call returning JSON format wont go to JSON file

在数据工厂中,我使用的是复制数据 activity,其中源是 REST API,它以 JSON 格式返回数据,接收器是 JSON ADLS 存储中的文件类型。

我遇到的问题是 JSON 文件中只出现“国内标题编号”数组中的第一条记录。剩下的记录再多也看不到了

此外,当我在源页面中“预览”我的数据时,它会显示数组中的所有嵌套数据。

API Call Returns this JSON data

Mapping in my Copy Data activity

File contents after sink to JSON file type

如下图所示,您已将项目用作 Collection 参考。

您需要使用“国内标题编号”作为Collection参考。

Note: For records where the array marked as collection reference is empty and the check box is selected, the entire record is skipped.

参考 - Schema and data type mapping in copy activity

最终发现使用以下方法更容易下载整个 JSON 文档 this mapping 然后在数据流中使用“展平”来提取我需要的部分。