将DMS数据从mongodb加载到elasticsearch时出错,有什么想法吗?
我正在尝试使用AWS DMS并将数据从mongodb传输到amazon elasticsearch 我在CloudWatch中遇到以下日志将DMS数据从mongodb加载到elasticsearch时出错,有什么想法吗?,mongodb,amazon-web-services,elasticsearch,aws-dms,Mongodb,Amazon Web Services,elasticsearch,Aws Dms,我正在尝试使用AWS DMS并将数据从mongodb传输到amazon elasticsearch 我在CloudWatch中遇到以下日志 { "error": { "root_cause": [ { "type": "mapper_parsing_exception", "reason": "Field [_id] is a metadata field and cannot be added
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Field [_id] is a metadata field and cannot be added inside a document. Use the index API request parameters."
}
],
"type": "mapper_parsing_exception",
"reason": "Field [_id] is a metadata field and cannot be added inside a document. Use the index API request parameters."
},
"status": 400
}
这是我对mongo db源的配置。
它将\u id作为单独列启用了
复选框。
我试着禁用它,它说没有主键。
你们知道有什么可以解决的吗
简要说明:
我已经将_id字段的映射添加到
旧的_id
,现在它不会导入所有其他字段,即使我将它们添加到映射中,因为ElasticSearch不支持LOB数据类型,其他字段也不会迁移
添加其他转换规则以将数据类型更改为字符串
{
"rule-type": "transformation",
"rule-id": "3",
"rule-name": "3",
"rule-action": "change-data-type",
"rule-target": "column",
"object-locator": {
"schema-name": "test",
"table-name": "%",
"column-name": "%"
},
"data-type": {
"type": "string",
"length": "30"
}
}
由于ElasticSearch不支持LOB数据类型,因此不会迁移其他字段 添加其他转换规则以将数据类型更改为字符串
{
"rule-type": "transformation",
"rule-id": "3",
"rule-name": "3",
"rule-action": "change-data-type",
"rule-target": "column",
"object-locator": {
"schema-name": "test",
"table-name": "%",
"column-name": "%"
},
"data-type": {
"type": "string",
"length": "30"
}
}