使用Azure Data Factory将csv文件,文本文件,pdf文件转换为json [英] Convert csv files,text files,pdf files into json using Azure Data Factory

查看:85
本文介绍了使用Azure Data Factory将csv文件,文本文件,pdf文件转换为json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从不同来源提取文件的方案,这些文件为text,csv,json和pdf格式.我通过使用ADF的复制数据活动来拉出这些文件.现在,应该将文件加载到cosmos db的同一表中.我可以将JSON文件加载到cosmos db中,但其他文件格式无法输入到cosmos db中.因此,我正在尝试将其他文件转换为JSON,但没有帮助.我已经完成了自定义活动解决方案,但是由于某些限制,我无法完成该解决方案.

I have a scenario in which I'm pulling files from different sources, The files are in text,csv,json and pdf format. I'm pulling these files by using copy data activity of ADF. Now, the files should be loaded into cosmos db into the same table. I'm able to load the JSON files in cosmos db but other files format cannot feed into cosmos db. so I'm trying to convert other files into JSON but no help. I have gone through custom activity solution but due to some restriction I'm not able to complete the solution.

请让我知道有什么方法可以将文本,csv,pdf文件转换为JSON,并且可以将其输入到cosmos db中.

Please let me know is there any way to transform text,csv,pdf files into JSON and can be feed into cosmos db.

推荐答案

在文件复制有效期间,Data Factory可以将.csv文件转换为.json.

Data Factory can convert the .csv file to .json during file copy active.

例如:

源数据集:

接收器数据集:

水槽:

映射:

管道运行:

检查容器中的新json文件:

Check the new json file in the container:

此示例仅想告诉您Data Factory可以帮助将某些格式的数据转换为.json文件.但是并非所有文件都可以转换.您必须自己进行测试并获得答案.

This example just want to tell you that Data Factory can help convert some format data to .json file. But not all the files can be converted. You must test by yourself and get the answer.

希望这会有所帮助.

这篇关于使用Azure Data Factory将csv文件,文本文件,pdf文件转换为json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆