Command line data comparison - how does it work?
The newly released version 1.3.5 of SelectCompare allows comparing data using a command line client (CLI). This makes it easy to run frequent comparisons without launching the UI. How does it work?
View SelectCompare repository
You have to create your data connections and data comparison projects using SelectCompare UI - which is described in many posts on this blog.
Then you open the command line window - Click the Start menu button in Windows and type cmd or Command prompt. A new window will appear.
Type sccmd. The CLI will display its welcome screen.
This screen allows you to configure and execute data comparisons. The most important commands are to list and compare.
Type sccmd list.
The help screen displays the options you have for the list command.
Type sccmd list --projects
The command line will display the list of projects defined in SelectCompare - you can verify it's the same list as in the graphical interface.
Similarly, when you type sccmd list --connections, you will obtain a list of connections defined in SelectCompare's repository.
It is very easy to compare data using the SelectCompare command line client.
In the command prompt, type sccmd to help compare
The CLI displays all the options that are currently available. In this post, I will just shortly focus on the simplest form of the command - sccmd compare --project-id=<n>
the project-id switch should be set to the project id value of one of the projects listed with the command sccmd list --projects. In this example, I will run sccmd compare --project-id=1, since I have only one project defined in the repository.
Here is the output, as well as the results of the comparison in the graphical user interface:
As you see, the CLI allows for a quick listing of defined connections and data comparison projects as well as for comparison of the defined data projects by their ID or by name.
In the upcoming posts, I will discuss the data export and automation of data testing.
Leave a comment
Please note, comments must be approved before they are published