Please enable JavaScript to view this site.

Altova DiffDog Server 2020 

The run command runs a comparison if given one of the following file kinds as argument:

 

*.dirdif (directory comparison)

*.filedif (file comparison)

*.dbdif (database data comparison)

 

You can create .filedif and .dirdif files with Altova DiffDog desktop application (https://www.altova.com/diffdog), by saving any file or directory comparison as a file. Database data comparisons (.dbdif) can be created only in DiffDog Enterprise edition.

 

Running *.filedif and *.dirdif files with DiffDog Server is supported only on Windows. For the comparison to be successful, all the file or directory paths that were valid on the desktop machine must be valid on the server machine. If you set up them comparison jobs directly in DiffDog Server (as opposed to using *.filedif or *.dirdif files), you can run them regardless of the platform.

 

Running *.dbdif files with DiffDog Server is most convenient if DiffDog Server runs either on the same computer as DiffDog desktop, or on a Windows machine. If DiffDog Server runs on a different machine or operating system, the following limitations apply:

 

If the comparison involves CSV files, running .dbdif files is supported only on Windows servers. For the comparison to be successful, all the CSV file paths that were valid on the desktop machine must be valid on the server machine.

If database connections are involved, the server machine must be configured and capable to handle the database connection. Namely, the database drivers and any other prerequisites required by the connection must be present on the target operating system as well. For example, if the .dbdif file includes a connection that requires on ODBC driver from the database vendor, that driver must be installed on the server machine as well. Note that some database connections methods supported on Windows are not supported on Linux and macOS. For more information, see Supported Databases.

 

If you set up them comparison jobs directly in DiffDog Server (as opposed to using *.dbdif files), you can run them regardless of the platform.

 

After executing the run command, DiffDog Server reports the outcome of the comparison using a return status code (0 = no differences, 1 = differences, 2 = error), similar to how it works with the diff command. The output is displayed directly at the command line, unless you suppress it with the --quiet option.

 

For .filedif or .dirdif comparisons, you can optionally redirect the output (the comparison result) to a report file in XML or text format. The path of the report file is defined from the graphical user interface of DiffDog desktop application. Namely, in DiffDog, you can set the output path of a .filedif or .dirdif comparison as follows:

 

1.Open an existing .dirdif or .filedif file (or create a new comparison) in DiffDog.

2.On the Tools menu, click Comparison Document Options.

3.Do one of the following:

a.To use no redirection to a file, click No Export (this is the default option).

b.To redirect the report to a text file, click Text file, and then enter the path in the adjacent text box.

c.To redirect the report to an XML file, click XML file, and then enter the path in the adjacent text box.

4.On the File menu, click Save As, and then save the comparison as .filedif (or .dirdif, if applicable).

 

For .dbdif comparisons, the outcome of the comparison is available only in XML format. Use the command shell redirection to redirect the output to a file, for example:

 

DiffDogCmdlClient run comparison.dbdif >"C:\result.xml"

 

Syntax

DiffDogCmdlClient run comparison-file1 [comparison-file2 [comparison-fileN]]

 

The run command can also be called using the import or load aliases. Therefore, you can use run, import or load interchangeably.

 

On Linux, use an all-lowercase to call the executable. In addition, on Linux and macOS, you might need to add the prefix "./" before the name of the executable when calling it from the current directory of the command shell.

 

Arguments

comparison-file

Specifies the path to a comparison file in .dirdif, .filedif, or .dbdif format. The path of the comparison file can be absolute or relative to the current working directory. You can supply as many comparison files as arguments as required. This is limited only by the number of input characters supported by your command shell.

 

Options

--config, --c

This option specifies the path to a client configuration file where the connection details to DiffDog Server are defined.

 

If you do not set the --c option, the DiffDog Command Line Client executable attempts to read the client configuration file from the same directory. If there is no configuration file in the same directory as the executable, the default values as described in the command line help and this documentation apply.

 

--port

This option specifies the port on which DiffDog Server listens for requests. Setting this option is meaningful if DiffDog Server runs on a port other than the default 29800. As an alternative to setting this option at the command line, you can set it in the Client Configuration File. Note that, if you set this value at the command line, it takes precedence over the one defined in the configuration file.

 

--quiet, --q

Prevents the standard output from being displayed at the command line. Valid values:

 

true

Do not display standard output in the terminal window.

false

(Default) Display standard output in the terminal window.

 

--loglevel, --L

Sets the reporting level for information, warning, and error messages. Valid values:

 

none

Suppress all logging.

info

Report information, warning, and error messages.

warning

Report error and warning messages.

error

(Default) Report only error messages.

 

--output-mode, --om

This option specifies the format of the comparison report. Valid values:

 

auto

(Default) Let the application determine.

text

Output the report in text format.

sql

Output the report in SQL format. This value is meaningful when the right side of the data comparison is a database. It contains SQL statements that merge data from the left to the right side of the comparison. For example, if there are missing rows on the right, INSERT statements are generated. Conversely, if there are extra rows on the right, DELETE statements are generated. For changed values, UPDATE statements are generated.

xml

Output the report in XML format.

 

--server

This option specifies the server address on which DiffDog Server listens for requests. Setting this option is meaningful if DiffDog Server runs on a server other than the default localhost. As an alternative to setting this option at the command line, you can set it in the Client Configuration File. Note that, if you set this value at the command line, it takes precedence over the one defined in the configuration file.

 

Example

To run the comparison file C:\DiffDog\Comparison1.filedif, use the following command:

 

DiffDogCmdlClient run C:\DiffDog\Comparison1.filedif

 

To run the comparison files Comparison1.filedif and Comparison2.dirdif (both located in C:\DiffDog directory), use the following command:

 

DiffDogCmdlClient run C:\DiffDog\Comparison1.filedif C:\DiffDog\Comparison2.dirdif

© 2019 Altova GmbH