如何按日期筛选 AWS DMS 任务?

1 分钟阅读
0

我想按日期筛选我的 AWS Database Migration Service (AWS DMS) 任务。

解决方法

要按日期筛选 AWS DMS 任务,请使用表映射。输入表映射时,对 filter-operator 参数使用以下值之一:

  • **lte:**小于或等于一个值
  • **ste:**小于或等于一个值(lte 别名)
  • **gte:**大于或等于一个值
  • **eq:**等于一个值
  • **noteq:**不等于一个值
  • **介于:**等于或介于两个值之间
  • **notbetween:**不等于或介于两个值之间

以下 JSON 示例筛选条件使用 gtedate_of_record >= 2019-01-08

{
  "rules": [
    {
      "rule-type": "selection",
      "rule-id": "1",
      "rule-name": "1",
      "object-locator": {
        "schema-name": "testonly",
        "table-name": "myTable_test"
      },
      "rule-action": "include",
      "filters": [
        {
          "filter-type": "source",
          "column-name": "date_of_record",
          "filter-conditions": [
            {
              "filter-operator": "gte",
              "value": "2019-01-08"
            }
          ]
        }
      ]
    }
  ]
}

**注意:**当导入数据时,AWS DMS 会使用日期格式 YYYY-MM-DD 和时间格式 YYYY-MM-DD HH:MM:SS 来进行筛选。

相关信息

使用表映射指定任务设置

使用源筛选条件

按时间和日期筛选

AWS 官方
AWS 官方已更新 2 个月前