How can I filter AWS DMS tasks by date?

2 minute read
0

I want to filter my AWS Database Migration Service (AWS DMS) tasks by date. How can I do that?

Resolution

To filter AWS DMS tasks by date, use table mappings. When entering your table mappings, the filter-operator parameter can have one of the following values:

  • lte – less than or equal to one value
  • ste – less than or equal to one value (lte alias)
  • gte – greater than or equal to one value
  • eq – equal to one value
  • noteq – not equal to one value
  • between – equal to or between two values
  • notbetween – not equal to or between two values

The following JSON example filter uses gte and date_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"
            }
          ]
        }
      ]
    }
  ]
}

Note: When importing data, AWS DMS uses the date format YYYY-MM-DD and the time format YYYY-MM-DD HH:MM:SS for filtering.


Related information

Using table mapping to specify task settings

Using source filters

Filtering by time and date

AWS OFFICIAL
AWS OFFICIALUpdated 2 years ago
2 Comments

Can I filter for the last month instead of a fixed date?

Mateusz
replied 9 months ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

profile pictureAWS
MODERATOR
replied 9 months ago