首页 > 解决方案 > Error while exporting from Azure Cosmos DB to Json file using Data Migration Tool

问题描述

I'm using the Microsoft Data migration tool to import from the Azure Cosmos Db container and export the content to a local JSON file.

I verified the connection string and it is successfully able to make connection with the database.

The query string is : SELECT * FROM ContainerName; Since I want all data.

However I'm facing the following error:

enter image description here

Edit:

The sample JSON that I'm trying to export:

[ { "id": "1", "SId": "101", "SName": "ABC" }, { "id": "2", "SId": "102", "SName": "XYZ" } ]

I've imported this JSON to Cosmos DB using the code on this link.

Please help me regarding this. Thank you.

标签: azureexportazure-cosmosdb

解决方案


I can't reproduce your issue on my side,so please refer to my working steps:

Source configuration:

enter image description here

Sink configuration:

enter image description here

Results in json file:

enter image description here

If you already pass through the verification of connection string,you could try to lock the issue in the error file.

enter image description here


Just for summary:

Finally, the issue is resulted from additional symbol ; at the end of sql. Please remove it because it can't be identified by the tool.


推荐阅读