json - azure 数据工厂: how to merge all files of a folder into one file

标签 json azure azure-data-factory

我需要创建一个大文件,通过合并分散在Azure Blob存储中包含的多个子文件夹中的多个文件,还需要进行转换,每个文件包含单个元素的JSON数组,所以最终文件,将包含 JSON 元素数组。

最终目的是在 Hadoop 和 MapReduce 作业中处理该大文件。

原始文件的布局类似于:

folder
 - month-01
   - day-01
        - files...

- month-02
    - day-02
        - files...

最佳答案

我根据你的描述做了测试,请按照我的步骤操作。

我的模拟数据:

test1.json 位于文件夹:date/day1

enter image description here

test2.json 位于文件夹:date/day2

enter image description here

源数据集,将文件格式设置为对象数组,文件路径为根路径

enter image description here

Sink DataSet,将文件格式设置为Array of Objects,将文件路径设置为要存储最终数据的文件。

enter image description here

创建复制事件并将复制行为设置为合并文件

enter image description here

执行结果:

enter image description here

我测试的目的地仍然是Azure Blob Storage,你可以引用这个link了解 Hadoop 支持 Azure Blob 存储。

关于json - azure 数据工厂: how to merge all files of a folder into one file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56550727/

相关文章:

.net - 在同一个azure web应用程序上创建虚拟目录

Azure AD - .Net Core 2 - 如何使用两个不同的客户端 ID?

json - Azure ADF - 只能使用整数索引选择数组元素

javascript json [对象文本]

azure - 语义记录进程内和进程外

javascript - JSON.stringify() 和 JSON.parse() 会改变数据类型吗?

azure - 如何使用 azure 复制事件加载具有重叠但动态架构列的多个文件?

c# - 隐藏/加密 Azure 数据工厂项目中的密码和 key

java - java 中 JSON Simple 库的问题

javascript - JSON 对象数组,用于 knockout 具有 Observable 属性的 Observable 数组