azure - Azure 数据工厂将活动 csv 复制到 cosmosdb 失败
问题描述
Azure 数据工厂复制活动
来源:csv 文件 接收器:cosmos db 操作:upsert
复制活动失败,代码为“2200”,id 字段存在问题,几周前就可以找到
我的 csv 文件有一个数字列,我将其用作 cosmos 文档的 id,因此我可以更新现有的
错误详情
{
'errorCode': '2200',
'message': 'ErrorCode=UserErrorDocumentDBWriteError,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Documents failed to import due to invalid documents which violate some of Cosmos DB constraints: 1) Document size shouldn't exceeds 2MB; 2) Document's 'id' property must be string if any, and must not include the following charaters: '/', '\\\\', '?', '#'; 3) Document's 'ttl' property must not be non-digital type if any.,Source=Microsoft.DataTransfer.DocumentDbManagement,'',
'failureType': 'UserError',
'target': 'Copy_ToCosmosDB',
'details': []
}
解决方案
当您在 cosmos db 中插入项目时,请不要更改您的分区键。因为 cosmos db 中的分区键无法更改。更多详细信息请参阅此文档。
例如:我的容器的分区键是/name
,这里有一个这样的项目:
{
"id": "2",
"no": 2,
"name": "Monica",
"createTime": "2020-06-22T00:00:00.000Z",
}
我的 csv 文件是这样的(将 Monica 更新为 Monica):
id,no,name,createTime
2,2,Monican,2020-06-22T00:00:00.000Z
当我运行管道时,我会遇到同样的错误。
推荐阅读
- python - 使用 Pickel 模块登录注册项目时出现问题
- mailchimp - 使用 Mandrill 发送 MailChimp 模板
- laravel - 如何在 laravel 中使用 groupby 获取总和和计数日期?
- python - 使用 koalas read_excel() 将 excel 读取到数据框时,没有值的列会出现错误“无法推断架构”
- html - 使用媒体查询时,如何将图像(在 div 内)与内部有 txt 的下一个 div 对齐?
- javascript - 从用户输入字段添加变量
- deep-learning - 如何将转储的 ocr 数据转换为结构化表格?
- ros - Turtlebot3 更换激光雷达传感器和 rpicamera
- python - 使用 Setuptools (setup.py) 构建 Python 包时使用动态版本
- c# - 如何在 C# 中使用反向公式。使用公式将控制器日期时间格式转换为正常日期时间?