使用数据迁移工具从Azure Cosmos DB导出到Json文件时出错 [英] Error while exporting from Azure Cosmos DB to Json file using Data Migration Tool
问题描述
我正在使用Microsoft数据迁移工具从Azure Cosmos Db container
和export
的内容import
到本地JSON
文件.
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.
查询字符串为:SELECT * FROM ContainerName;
因为我需要所有数据.
The query string is : SELECT * FROM ContainerName;
Since I want all data.
但是我遇到以下错误:
我要导出的示例JSON:
The sample JSON that I'm trying to export:
[{ "id":"1", "SId":"101", "SName":"ABC" }, { "id":"2", "SId":"102", "SName":"XYZ" } ]
[ { "id": "1", "SId": "101", "SName": "ABC" }, { "id": "2", "SId": "102", "SName": "XYZ" } ]
我已使用JSON将此JSON导入Cosmos DB 此链接上的代码. /a>
I've imported this JSON to Cosmos DB using the code on this link.
请帮助我.谢谢.
推荐答案
我无法单方面再现您的问题,因此请参考我的工作步骤:
I can't reproduce your issue on my side,so please refer to my working steps:
源配置:
接收器配置:
json文件中的结果
Results in json file:
如果您已通过连接字符串的验证,则可以尝试将问题锁定在错误文件中.
If you already pass through the verification of connection string,you could try to lock the issue in the error file.
仅供参考:
最后,问题是由sql末尾的附加符号;
引起的.请删除它,因为该工具无法识别它.
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.
这篇关于使用数据迁移工具从Azure Cosmos DB导出到Json文件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!