How do 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.

Resolution

To filter AWS DMS tasks by date, use table mappings. When you enter your table mappings, use one of the following values for the filter-operator parameter:

  • 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 you import data, AWS DMS uses the date format YYYY-MM-DD and the time format YYYY-MM-DD HH:MM:SS to filter.

Related information

Using table mapping to specify task settings

Using source filters

Filtering by time and date

AWS OFFICIAL
AWS OFFICIALUpdated 10 days ago
2 Comments

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

replied 2 years ago

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

profile pictureAWS
EXPERT
replied 2 years ago