Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将DMS数据从mongodb加载到elasticsearch时出错,有什么想法吗?_Mongodb_Amazon Web Services_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch_Aws Dms - Fatal编程技术网 elasticsearch,aws-dms,Mongodb,Amazon Web Services,elasticsearch,Aws Dms" /> elasticsearch,aws-dms,Mongodb,Amazon Web Services,elasticsearch,Aws Dms" />

将DMS数据从mongodb加载到elasticsearch时出错,有什么想法吗?

将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

我正在尝试使用AWS DMS并将数据从mongodb传输到amazon elasticsearch

我在CloudWatch中遇到以下日志

{
   "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"
      }
}