This project is a utility that can be used to test data between two databases (like MySQL), same or different. It can be used for making sure that data migrations are accurate or database upgrades work correctly.
It is built using the PrestoDB's verifier code-base. It improves upon PrestoDB's verifier implmentation in two ways:
- The JDBC Driver's are external runtime dependencies of the project which are provided as maven co-ordinates that are resolved during runtime. As a result, using this project we can verify data of any database as long as it supports JDBC and the jar is accessible via Maven.
- The queries for verifying the data are provided as JSON. This removes any external dependency of storing the queries MySQL.
To use the project, do the following:
-
Download the project code.
-
Perform maven install.
mvn clean install
-
Create the config.properties.
suite=default max-row-count=100000 always-report=true test.username=root test.password= test.gateway=jdbc:mysql://localhost:3306/employees test-jdbc-driver-maven-coordinates=mysql:mysql-connector-java:5.1.31 test-jdbc-driver-name=com.mysql.jdbc.Driver control.username=root control.password= control.gateway=jdbc:mysql://localhost:3306/employees control-jdbc-driver-maven-coordinates=mysql:mysql-connector-java:5.1.31 thread-count=1
-
Rename the db-verifier-{version}-executable.jar to
db-verifier
, make it executable withchmod +x
, then run it:./db-verifier config.properties