0 / 0
Compare stage in DataStage: Stage tab

Compare stage: Stage tab

The Compare Stage tab enables you to control aspects of the Compare stage.

Double-click the stage to open the stage properties panel. The Properties section lets you specify what the stage does. The Advanced section allows you to specify how the stage executes.

Properties

The following table lists the properties and their attributes:
Table 1. Properties
Category/Property Values Default Mandatory? Repeats? Dependent of
Options/Abort On Difference True/False False Y N N/A
Options/Warn on Record Count Mismatch True/False False Y N N/A
Options/`Equals' Value number 0 N N N/A
Options/`First is Empty' Value number -2 N N N/A
Options/`Greater Than' Value number 1 N N N/A
Options/`Less Than' Value number -1 N N N/A
Options/`Second is Empty' Value number 2 N N N/A
Options/Key Input Column N/A N Y N/A
Options/Case Sensitive True/False True N N Key

Options

Use the following options to specify how the Compare stage operates:

Abort on difference

This property forces the stage to abort its operation each time a difference is encountered between two corresponding columns in any record of the two input data sets. This is False by default, if you set it to True you cannot set Warn on Record Count Mismatch.

Warn on record count mismatch

This property directs the stage to output a warning message when a comparison is aborted due to a mismatch in the number of records in the two input data sets. This is False by default, if you set it to True you cannot set Abort on difference.

`Equals' value

Allows you to set an alternative value for the code which the stage outputs to indicate two compared records are equal. This is 0 by default.

`First is empty' value

Allows you to set an alternative value for the code which the stage outputs to indicate the first record is empty. This is -2 by default.

`Greater than' value

Allows you to set an alternative value for the code which the stage outputs to indicate the first record is greater than the other. This is 1 by default.

`Less than' value

Allows you to set an alternative value for the code which the stage outputs to indicate the second record is greater than the other. This is -1 by default.

`Second is empty' value

Allows you to set an alternative value for the code which the stage outputs to indicate the second record is empty. This is 2 by default.

Key

Allows you to specify one or more key columns. Only these columns will be compared. Repeat the property to specify multiple columns. You can use the Column Selection dialog box to select several keys at once if required. The Key property has a dependent property:

  • Case Sensitive

    Use this to specify whether each key is case sensitive or not, this is set to True by default, that is, the values "CASE" and "case" in would end up in different groups.

Advanced

The Advanced section on the Stage tab allows you to specify the following options:
  • Execution Mode. The stage can execute in parallel mode or sequential mode. In parallel mode the input data is processed by the available nodes as specified in the Configuration file, and by any node constraints specified on the Advanced section. In Sequential mode the entire data set is processed by the conductor node.
  • Combinability mode. This is Auto by default, which allows IBM® DataStage® to combine the operators that underlie parallel stages so that they run in the same process if it is sensible for this type of stage.
  • Preserve partitioning. This is Propagate by default. It adopts Set or Clear from the previous stage. You can explicitly select Set or Clear. Select Set to request that next stage in the job should attempt to maintain the partitioning.
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more