简体   繁体   English

从SQL Server迁移到Azure Cosmos数据库后无法查看数据

[英]Unable to see data after data migration from SQL Server to Azure Cosmos db

I used Azure Data Factory to migrate data from SQL Server to Azure CosmosDB. 我使用Azure数据工厂将数据从SQL Server迁移到Azure CosmosDB。 In Data Factory, it shows the status is Ready and succeeded (100%). 在“数据工厂”中,它显示状态为“就绪且成功”(100%)。 Retry attempt is 1. 重试尝试为1。

But I am not able to see any data in CosmosDB after the migration is done. 但是迁移完成后,我看不到CosmosDB中的任何数据。 It also shows an error message from CosmosDB that 它还显示来自CosmosDB的错误消息,

"code" : 500, "body": "Detected corrupted documents without _id identifier, verify that you are only storing documents through Mongo protocol and not SQL API or DocumentDB SDK."} “ code”:500,“ body”:“检测到没有_id标识符的损坏文档,请确认您仅通过Mongo协议存储文档,而不是SQL API或DocumentDB SDK。”}

A few things I did differently is that 我做了一些不同的事情是

  • I un-selected the "column name is selected" option, which I assume the data will migrate from scratch. 我没有选择“选择列名”选项,我假设数据将从头开始迁移。
  • I converted from SQL Server to Cosmos DB - mongo db. 我从SQL Server转换为Cosmos DB-mongo db。 I am not sure if it will make the data corrupted because it is basically converting from SQL to NO-SQL. 我不确定它是否会使数据损坏,因为它基本上是从SQL转换为NO-SQL。

Please let me know your thoughts. 请让我知道你的想法。 Thank you! 谢谢!

From this official doc you could see Azure Cosmos DB connector supports only Cosmos DB SQL API(document db). 从此官方文档中,您可以看到Azure Cosmos DB连接器仅支持Cosmos DB SQL API(文档db)。 And the type in the Dataset properties need to be set to DocumentDbCollection . 并且数据集属性中的类型需要设置为DocumentDbCollection

Azure Document DB and Azure Mongo DB are both NO-SQL database in the Azure Cosmos DB.However, there are many differences between them. Azure Document DB和Azure Mongo DB都是Azure Cosmos DB中的NO-SQL数据库,但是它们之间存在许多差异

Hope it helps you. 希望对您有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM