Skip to content

Find a way to only capture the DDL's in DMS to a CSV file

1

Is there a way to capture only DDL happening at Source postgresql database using AWS DMS to a csv file?

2 Answers
1
Accepted Answer

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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

answered 2 years ago

AWS
SUPPORT ENGINEER

reviewed 2 years ago

  • Can we capture those DDLs to a csv file?

0

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

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.