首页 > 解决方案 > DocumentDB 迁移工具 - 显示的资源名称包含无效字符“/”

问题描述

我正在尝试使用 DocumentDB 迁移工具,以便将条目从 CSV 文件顺序插入到 CosmosDB 数据库中。条目如下所示:

Id, Description, BoxId, BoxDescription, BoxWidth, BoxHigh, BoxDepth, Unit
125072,...,1151029,...,860,635,500,...

我通过文档中的过程,成功验证连接字符串,然后:

显示的生成命令如下所示:

/ErrorDetails:All /s:CsvFile /s.Files:C:\\Users\\...\\Desktop\\Dataprod.csv /t:DocumentDB /t.ConnectionString:AccountEndpoint=https://xxxx.documents.azure.com:443;AccountKey=...;Database=https://xxxx.table.cosmosdb.azure.com:443/; /t.ConnectionMode:Gateway /t.IdField:Id /t.UpdateExisting /t.Collection:ProductCollection /t.PartitionKey:product_key

每当我运行导入步骤时,都会收到以下错误:

The resource name presented contains invalid character '/'.

我不明白,也找不到导致此问题的资源。

标签: azuremigrationazure-cosmosdb

解决方案


Database=https://xxxx.table.cosmosdb.azure.com:443/;位是错误的。

Database值应该是Database您要迁移到的名称,而不是DatabaseAccounturl。您需要将其更改为数据库的字母数字名称。


推荐阅读