| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository contains a Python script designed to validate data replication tasks in AWS Database Migration Service (DMS). The script checks for potential issues such as missing or duplicate data in the tables being replicated. It leverages AWS SDK for Python (Boto3) to interact with AWS services and sends notifications about the status of each task to a specified API endpoint.
The objective of this project is to automate the validation of data replication integrity across multiple AWS Database Migration Service (DMS) tasks. The provided Python script achieves this by performing the following actions:
Processing Multiple DMS Replication Tasks: Iterates over a predefined set of DMS replication tasks identified by their Amazon Resource Names (ARNs), which are specified in the tasks dictionary within the script.
Validating Task Existence: For each task, the script checks if the replication task exists in AWS DMS. If a task is not found, it logs a warning message and proceeds to the next task without interrupting the entire validation process.
Retrieving Table Statistics: For existing tasks, it retrieves detailed table statistics using the describe_table_statistics method from the AWS DMS client. This information includes operation counts like inserts, updates, and deletes, as well as their applied counterparts.
Detecting Missing or Duplicate Data:
Generating Event Notifications:
Before running the script, ensure you have the following:
git clone https://github.com/nathadriele/DMS-missing-or-duplicate-data-validation-script.git
cd dms-data-validationpip install -r requirements.txtexport AWS_ACCESS_KEY_ID=your_access_key_id
export AWS_SECRET_ACCESS_KEY=your_secret_access_keypython dms_data_validation.pyThe script will iterate over the specified DMS tasks, validate the data, and send notifications based on the results.
This Python script interacts with AWS Database Migration Service (DMS) to validate the integrity of data replicated between different database environments. Below is a detailed explanation of the key components and functions of the script:
The script includes basic testing functions to ensure the data loader function works as expected.
The metadata.yaml file contains the configuration for the Mage.ai block used in this project. It defines the block's properties, execution type, and other settings that control how the data validation process is executed.
The triggers.yaml file defines the schedule and settings for triggering the data validation pipeline. It specifies the frequency (@daily), start time, and other settings necessary for automating the execution of the validation process.
This project plays a vital role in Data Engineering by ensuring that the data stored in PostgreSQL tables conforms to the expected data types. Data Engineers rely on accurate and reliable data to build data pipelines, perform ETL processes, and generate meaningful insights. By validating data types:
| Back | FazBrowse Home | New Git URL |