Configure Comparison Rules
The Rules Configuration section empowers users to define, manage, and apply customizable rules during data comparison. These rules offer advanced control over how data is interpreted and matched between source and target datasets.
- To Configure a New Rule navigate to Settings > Workspace > Your Workspace > Comparison Rules
and click Add New Rule. - A Rule Configuration pop-up will appear. Provide the following details:
- Rule Name - Provide a descriptive name for your rule.
- Rule Type - Choose from the following types:
-
Schema Override:
Use this type to resolve schema mismatches where column names or data structures differ between the source and target datasets, and you want to intentionally ignore specific differences during comparison. You can use predefined functions from Datachecks to apply these rules. For more information, refer to the available function types at the bottom of the page. -
Column Transform:
Use this rule type to manually apply transformation functions to selected columns. For example, to remove leading and trailing spaces from a column, you can use the following transformation:TRIM({column})
This will convert values like
" John"
and"JOhn "
to"John"
, which ensures consistent formatting across source and target datasets.
-
- Click Create Rule. The new rule will be saved and listed under Comparison Rules.
Schema Override Functions:
Function | Description | Example Input | Processed Output |
---|---|---|---|
ignore_column_length_difference | Ignores differences in string/varchar length declarations. | VARCHAR(50) vs VARCHAR(100) | Treated as equal |
allow_equivalent_data_types | Treats data types in a group as equivalent (e.g., [varchar, character varying] ). | varchar vs character varying | Treated as equal |
ignore_numeric_precision_difference | Ignores differences in numeric column precision (total digits). | NUMERIC(10,2) vs NUMERIC(12,2) | Treated as equal |
ignore_numeric_scale_difference | Ignores differences in numeric column scale (digits after the decimal). | NUMERIC(10,2) vs NUMERIC(10,4) | Treated as equal |
ignore_datetime_precision_difference | Ignores differences in DATETIME/TIMESTAMP precision. | TIMESTAMP(3) vs TIMESTAMP(6) | Treated as equal |
Updated 11 days ago