Dear AWS Customer,
Thank you for your query. Hope you are doing good.
After going through the post, I understand that you have a scenario wherein you have N number of source databases and single table at the target database. Each source database has a replication task set as "Full Load + CDC" to pull data from source and push to single target table (on the target) with database identifier as the additional field to identify from which source the data came from.
When the Target table preparation mode options is set to Truncate, you would like to know if there is a way to override the functionality to only remove records based on the partition of data based on a sources database identifier.
Please correct me if I misunderstood your query.
Please allow me to answer your query:
As of today, AWS DMS have only below 3 options for "Target table preparation mode".
- Do nothing
- Drop tables on target
Each option have been programmed with the corresponding action. For example, if you opt for "Target table preparation mode" to "Drop tables on target" and if AWS DMS find tables already present in target database then AWS DMS is designed to drop the tables, and creates new tables in their place and load the data.
Similarly for "Target table preparation mode" to "Truncate" as soon as the AWS DMS find the tables in the target database, AWS DMS will truncate the tables (AWS DMS leaves the tables and their metadata in place, but removes the data from them) and load the data. Refer link below.
So as of today AWS DMS doesn't have such functionality that you have mentioned.
Being said that, the new features release updates are available regularly on the official AWS Updates sources, Please be on the lookout using the links attached below for your reference.
 RDS What's New - https://aws.amazon.com/new/
 AWS Database Blog - https://aws.amazon.com/blogs/database/
 AWS Blog - https://aws.amazon.com/blogs/aws/
I hope that above information is useful. Thanks.
Question about Replication tasks Target table preparation mode options.asked 22 days ago
Global Table Replicationasked a month ago
Is supported Timestamptz datatype in DMS postgres replication?asked 3 years ago
AWS DMS doing a SELECT on TEXT column during continuous replication
Migrating catalog table to Aurora Mysql targetasked 2 years ago
TEXT columns from Source SQL Server database are not being replicated to targetasked 7 months ago
DynamoDB Global Table replication stream event issuesasked 2 years ago
Is this a good way to contend with a start point restore for an N-tier replication task.asked 23 days ago
Phantom Update on Aurora Postgres from AWS DMS Replication from SQL Server Source
DMS: How does a replication task handle duplicate data w/o Primary/Unique keys on the tableasked 6 months ago