- Newest
- Most votes
- Most comments
Hello.
You can accomplish your objective of transferring data from SQL Server to DynamoDB in smaller increments by combining SQL Server and DMS capabilities. Here is a broad approach:
Develop a Stored Procedure: Within SQL Server, create a stored procedure responsible for retrieving and processing data from the two substantial tables in manageable portions. This stored procedure should select a batch of data, execute any necessary transformations, and then insert this data into a staging table.
Establish a Staging Table: Create a staging table in SQL Server dedicated to holding the data earmarked for migration to DynamoDB.
Scheduled Execution: Set up a schedule for running your stored procedure at regular intervals, which can be achieved through mechanisms like SQL Server Agent or a cron job. During each execution, the stored procedure will process a batch of data and insert it into the staging table.
DMS Migration: Configure a DMS replication task that reads data from the SQL Server staging table and mirrors it to DynamoDB. You can use the staging table as the source for your DMS task.
Incremental Replication: Fine-tune your DMS task to perform incremental replication, ensuring that it exclusively captures and migrates new records from the SQL Server staging table to DynamoDB during each execution. DMS incorporates features for managing ongoing changes.
Best regards, Andrii
Relevant content
- Accepted Answerasked 2 years ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 years ago
Hi @Andrii S
Thanks for your response. Yes I did think about the staging table approach. Considering the fact that the table is almost 5TB and I would need another 5TB to go with the staging table approach, I wanted to check if calling the stored procedure directly from DMS replication task is possible or not. If that is not possible, then the approach you outlined looks optimal in terms of performance overhead in the Source sql.
Thanks