- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是我的问题。我正在尝试将一个大型 csv 文件上传到 cosmos db (~14gb),但我发现很难最大化我所支付的吞吐量。在 Azure 门户指标概述 UI 上,它显示当我支付 16600 RU/s 时,我正在使用 73 RU/s。现在,我正在使用 pymongo 的批量写入功能上传到数据库,但我发现任何大于 5 的bulk_write 长度都会抛出硬 Request rates is big.
异常。我这样做错了吗?在这种情况下,有没有更高效的方式来上传数据呢?互联网带宽可能不是问题,因为我正在从 azure vm 上传到 cosmos db。
我现在如何在 python 中上传的结构:
for row in csv.reader:
row[id_index_1] = convert_id_to_useful_id(row[id_index_1])
find_criteria = {
# find query
}
upsert_dict = {
# row data
}
operations.append(pymongo.UpdateOne(find_criteria, upsert_dict, upsert=True))
if len(operations) > 5:
results = collection.bulk_write(operations)
operations = []
如有任何建议,我们将不胜感激。
最佳答案
亚伦.是的,正如您在评论中所说,Azure Cosmos DB MongoDB API 支持迁移工具。您可以在 official doc 中找到打击声明。 .
The Data Migration tool does not currently support Azure Cosmos DB MongoDB API either as a source or as a target. If you want to migrate the data in or out of MongoDB API collections in Azure Cosmos DB, refer to Azure Cosmos DB: How to migrate data for the MongoDB API for instructions. You can still use the Data Migration tool to export data from MongoDB to Azure Cosmos DB SQL API collections for use with the SQL API.
我只是为您提供了一个可以使用的解决方法 Azure Data Factory 。请引用这个doc使 cosmos db 作为接收器。并引用此 doc将Azure Blob存储中的csv文件作为源。在管道中,您可以配置批量大小。
当然,您可以通过编程来完成此操作。您没有错过任何内容,错误请求率较大
仅意味着您超出了预配置的 RU 配额。您可以提高 RU 设置的值。请引用这个doc .
如有任何疑问,请随时告诉我。
关于python-2.7 - 如何使用 azure cosmos db 最大化数据库上传速率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52016070/
我们是 COSMOS 新手,正在将多个应用程序迁移到云端。如果我们每个 COSMOS 实例只有一个数据库,或者所有应用程序数据库都在单个 COSMOS 实例中,那么这会具有哪些优点和缺点,这是否具有成
我有一个带有几个数据库的 Azure Cosmos 数据库,并且想要创建一个 Cosmos 服务帐户的副本(具有相同的 API/数据库),但没有数据,如何实现此目的? 克隆 Cosmos 服务帐户。”
我正在尝试使用 Azure Cosmos DB Data Migration Tool ,但无法连接到我的数据库。 在文档中指出 - The format of the Azure Cosmos DB
目标 使用 C#、.NET Core 2.2 将超过 100 万个文档导入 Azure Cosmos DB。 我尝试过的 我正在使用 Azure Cosmos Bulk Executor 库。我在这里
Microsoft 在 C#/.NET 中提供了两种使用 cosmos dbs 的方法。 可以使用 Entity Framework(EF) Core,它在后台使用 Cosmos SDK,并允许您将
宇宙Java SDK com.azure azure-cosmos 4.1.0 我们希望在将 POJO 序列化为 JSON 时使用自定义日期格式,目前它仅转换为 long。
CosmosDb 提供商正在发送此消息: “响应状态代码不表示成功:503 子状态:0 原因:(请求失败,因为客户端无法与跨 1 个区域的 3 个端点建立连接。请检查客户端资源匮乏问题并验证连接客户端
我正在尝试通过启用服务器端分页来从 Cosmos DB 获取数据。我有两个选择: 使用 EF Core Azure Cosmos DB 提供程序 var query = DbContext.Order
我已经下载了 Azure Cosmos DB Data Migration Tool从这里。我正在将 Sql 数据迁移到 Cosmos DB。使用迁移工具时。 Source Information 我
我有一个 Azure 函数,使用用 Python 编写的 Cosmos DB 触发器,该触发器具有与 Cosmos DB 的 IN 和 OUT 绑定(bind),因此当容器中更新文档时,我会在另一个容
我可以在 azure cosmos-db explore 中运行查询,如下图所示,并将响应视为 json 数组 我想使用 Java 和 azure-cosmos SDK 来执行相同的操作 下面是我的函
我需要运行聚合查询来计算记录数,例如从 Product_Ratings r 分组中选择 r.product_id、r.Rating、COUNT(1) 个 R.product_id、r.Rating。该
我找到了2个官方包 Microsoft.Azure.DocumentDB.Core This client library enables client applications targeting
我找到了2个官方包 Microsoft.Azure.DocumentDB.Core This client library enables client applications targeting
我正在尝试将包含 JSON 列表的 JSON 文件从 .Net 4.6.1 控制台应用程序批量导入到 Azure Cosmos DB。 我能够成功地创建数据库和容器。但是,我在第 40 行收到以下错误
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
我想监视来 self 的应用程序的一些事件。 一种选择是将数据发送到 Azure 事件中心并使用流分析进行一些后处理并将数据输入到 cosmos db 中。 另一个选项是从应用程序存储到 cosmos
我想监视来 self 的应用程序的一些事件。 一种选择是将数据发送到 Azure 事件中心并使用流分析进行一些后处理并将数据输入到 cosmos db 中。 另一个选项是从应用程序存储到 cosmos
从 Udemy 类(class)获得了 .Net 代码并在我的本地运行。编写了一个连接到 Azure Cosmos DB 并创建项目的 Azure 函数。但无法连接到 Azure Cosmos DB。
我在尝试将它们与 .NET Core 3.1 一起使用的所有这些包之间迷失了方向。 我正在使用 Azure.Cosmos 和 Azure.Storage.Blob,但我不确定是否需要使用 Micros
我是一名优秀的程序员,十分优秀!