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