azure - 将数据从 Cosmos 数据库帐户导出到另一个帐户的最佳方法

标签 azure azure-cosmosdb

我想要做的事情与我们可以轻松使用Azure Sql Server数据库类似,我们可以单击复制功能,在另一个Sql Server中创建相同的数据库。

我在 Azure Cosmos DB 资源中没有看到该功能。

查看 Microsoft 文档,他们似乎指向 Data migration tool 但如果我们已经有许多容器/集合和数百万条记录,则在本地运行可能不切实际。

还有其他建议吗?

最佳答案

您可以使用 Azure 数据工厂管道将数据从一个 Azure Cosmos 容器移动到另一个容器。 以下是我使用 ADF 将数据从一个容器移动到另一个容器所遵循的步骤。

  1. 我在 Cosmos db 中有两个容器,如下所示, enter image description here

  2. 员工容器有数据, enter image description here

  3. 最初,staff1 没有数据, enter image description here

  4. 创建了 Azure 数据工厂资源。

  5. 已创建 Azure cosmos DB 类型的链接服务。 enter image description here

  6. 创建了两个 Azure cosmos DB 类型的数据集。一个用于源,另一个用于接收器。 enter image description here enter image description here

  7. 创建了如下所示的管道, enter image description here

  8. 选定的 Sink 如下所示, enter image description here

  9. Ran pipeline运行成功,数据插入目标容器。 enter image description here enter image description here

  10. 数据被插入到目标中,如下所示, enter image description here 引用link

关于azure - 将数据从 Cosmos 数据库帐户导出到另一个帐户的最佳方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74364999/

相关文章:

azure - Azure 存储表上的 PartitionKey 和 RowKey

azure - 通过 join 过滤嵌套列表时是否使用 cosmos 索引?

c# - DocumentDB 更新插入和替换不会改变复杂的属性?

azure - 如何从门户/powershell获取未使用的Azure资源列表?

azure - 当自动索引指定为 'none' 时,索引模式值不能为 'true'

powershell - 无法执行 DSC 配置文件

azure - 如何在标准 Azure 网站实例上托管多个网站,这是 Web 托管计划吗?

c# - Azure函数错误: Microsoft. Azure.WebJobs.Host : Error indexing method 'Function1' .无法将参数 'document'绑定(bind)到类型IAsyncCollector`

azure - 如何使用 Azure Powershell 执行此操作?

c# - 如何从 Azure ActiveDirectory 应用程序获取当前 token