DB Data and CSV Data
With DiffDog Server, you can compare (i) data from different databases (DBs) with each other, (ii) data from different CSV files with each other, as well as (iii) data from DBs against data from CSV files. The data from DBs can be data from DB tables or views, or from custom recordsets retrieved with the help of SQL queries.
There are two ways to run DB/CSV data comparisons in DiffDog Server:
•via a comparison job in the client or server configuration file
•via a comparison file (.dbdif file) created in Altova DiffDog Enterprise Edition
Both methods are described below.
Comparison job in configuration file
A comparison job in a configuration file is defined in a [datadiff:<name>] section of the client or server configuration file. The comparison job is executed by calling the data-diff command and submitting the name of the comparison job as the command's argument (see Step 3 in the procedure below).
In order to define a comparison job, carry out the steps described below.
1.In the configuration file (client or server, as appropriate), define the data sources you want to compare, each as a separate [datasource] section of the config file.
2.In the configuration file, define the data comparison job in a [datadiff] section.
3.Run the data-diff command with the name of the comparison job as the command's argument, like this:
diffdogcmdlclient data-diff --c=client_config.ini reports
The topics of this section describe how to create the [datasource] and [datadiff] sections required to define a comparison job in a configuration file. This section also contains a Datasource Examples topic and a topic that includes a description of CSV comparisons via the configuration file.
Comparison file created in DiffDog (.dbdif file)
On Windows, create the comparison job in DiffDog Enterprise and save it as a .dbdif files, then run the job on the server using the run command:
diffdogserver run <.dbdif-file>
diffdogcmdlclient run <.dbdif-file>
Note the following points:
•For more information about creating database data comparison files, refer to the DiffDog user manual.
•If you run the .dbdif file with DiffDog Server on a different machine or operating system, then the database drivers required by the connection must also be installed on the machine running the command.
•Note that some database connections methods supported on Windows are not supported on Linux and macOS. See also Supported Databases.
•For additional notes about comparisons involving CSV files, see Compare CSV Data.