Command line data comparison - how does it work?


The newly released version 1.3.5 of SelectCompare allows to compare data using 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 - it is described in many posts on this blog.

Then you open 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.

SelectCompare command line interface

This screen allows you to configure and execute data comparisons. The most important commands are list and compare.

Type sccmd list.

SelectCompare CLI - list projects and connections

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.

SelectCompare - list of projects

Similarly, when you type sccmd list --connections, you will obtain a list of connections defined in the SelectCompare's repository.

SelectCompare CLI - list of connections

Data Comparison

It is very easy to compare data using the SelectCompare command line client.

In the command prompt, type sccmd 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 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:

SelectCompare CLI - data comparison

 

As you see, the CLI allows for 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.

 


Time is money

Write your queries with filters and aggregations and receive the comparison results. Reuse the queries and comparison definitions - save time!

Try SelectCompare today!


Choose your edition



Leave a comment


Please note, comments must be approved before they are published