Convert csv files,text files,pdf files into json using Azure Data Factory

Viewed 4077

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.

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

1 Answers

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

For example:

Source dataset:

enter image description here

Sink dataset:

enter image description here

Sink:

enter image description here

Mapping: enter image description here

Pipeline Running: enter image description here

Check the new json file in the container:

enter image description here

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.

Hope this helps.

Related