- Newest
- Most votes
- Most comments
Yes, it is possible to capture only Data Definition Language (DDL) statements from a PostgreSQL source database using AWS Database Migration Service (DMS). To achieve this, you can configure your DMS task with specific settings:
-
Enable the "CaptureDdls" option: This setting allows DMS to capture DDL events by creating various artifacts in the PostgreSQL database when the task starts. You can set this to true in your task settings.
-
Configure the task for CDC (Change Data Capture) only: Set up your DMS task to perform only CDC, without the initial full load. This way, DMS will focus on capturing changes, including DDL statements.
-
Use table mapping rules: Create table mapping rules that exclude all tables but include schema-level changes. This approach allows you to capture DDL statements without replicating actual data.
-
Monitor DDL events: DMS will capture supported DDL events such as CREATE, ALTER, and DROP statements for tables. However, be aware that there are some limitations, such as DDL statements within nested constructs or inner function bodies may not be captured.
-
Check for required artifacts: Ensure that DMS has created the necessary objects in your source database's public schema, such as the "awsdms_intercept_ddl" trigger and the "awsdms_ddl_audit" table.
By implementing these configurations, you can set up AWS DMS to focus on capturing DDL statements from your PostgreSQL source database without replicating the actual data. Keep in mind that you may need to adjust your approach based on your specific requirements and the limitations of PostgreSQL as a source in DMS.
Sources
Using a PostgreSQL database as an AWS DMS source - AWS Database Migration Service
PostgreSQLSettings - AWS Database Migration Service
Issue with AWS DMS Full Load + CDC Task Not Reflecting Newly Created Tables in Target DB | AWS re:Post
We can achieve the requirement through time travel logs and it is not possible to capture the DDLs only, rather DMLs will be part as well..
answered 2 years ago
Relevant content
asked a year ago

Can we capture those DDLs to a csv file?