使用 DMS 将 MySql 迁移到 AWS OpenSearch

问题描述 投票:0回答:1

我需要使用 DMS 将 MySql(Aurora) 数据库迁移到 AWS OpenSearch 数据库。在官方文档中,提到DMS为每个RDBMS表创建索引。但我想做的是通过连接表只创建一个索引。例如;假设我们有一对多相关的 Order 和 OrderLine 表。是否可以将我的数据迁移到这样的文档中?

"hits": [
      {
        "_index": "orders",
        "_id": "12345",
        "_score": 1,
        "_source": {
          "orderId": "12345",
          "orderDate": "2023-10-23T21:05:37.263",
          "store": "Store-1",
          "orderLines": [
            {
              "lineNumber": 1,
              "productName": "Product-1",
              "quantity": 1,
              "price": 119.99
            },
            {
              "lineNumber": 2,
              "productName": "Product-2",
              "quantity": 1,
              "price": 39.99
            }
       ]
    }
}
amazon-rds database-migration opensearch aws-dms
1个回答
0
投票

AWS Database Migration Service (DMS) 主要设计用于将数据从源关系数据库系统复制到目标关系数据库系统。当将数据迁移到 Amazon OpenSearch 等 NoSQL 数据库时,您可能会因数据模型的差异而面临挑战。

为了实现所需的结构,您可能需要在将数据迁移到 OpenSearch 之前或之后执行一些数据转换,ETL

您可以编写一些

custom SQL query to join the tables
并使用Logstash JDBC输入,最终将数据有效地推送到Elasticsearch/Opensearch。

© www.soinside.com 2019 - 2024. All rights reserved.