Quality Rule Parameters
This topic describes how to configure the parameters for quality rules.
Data Table Parameters
Data Table Rules
Template type | Description |
Completeness/Uniqueness | Completeness - Null value check/Empty string check Uniqueness - Field uniqueness check/Field group count check/Field duplicate value count check:
|
Timeliness |
|
Validity |
|
Consistency |
|
Stability |
|
Custom SQL |
Note When you select a custom rule template for custom SQL, Dataphin automatically parses the variable fields of the rule template as property values. You can configure the values based on the variable description of the selected rule template. |
Data Table Check Configurations
Template type | Parameter | Description |
Completeness | Abnormal Row Count/Normal Row Count/Abnormal Rate/Normal Rate |
|
Uniqueness | Abnormal Row Count/Normal Row Count/Abnormal Rate/Normal Rate |
|
Statistical value | The data returned by the | |
Statistical value (number of duplicate rows/duplication rate) |
| |
Timeliness, validity | Abnormal Row Count/Normal Row Count/Abnormal Rate/Normal Rate |
|
Consistency | Statistical difference, Statistical difference rate (%) | Statistical difference: Field to check - Comparison field. Statistical difference rate: Field to check / Comparison field. |
Stability | Statistical value (1-day volatility rate, 7-day volatility rate, 30-day volatility rate) | The system calculates volatility rates by comparing the current row count with historical data from 1, 7, and 30 days prior. These rates are then compared against a set threshold, and an alarm is triggered if any rule is not met. |
Custom SQL | Abnormal Row Count/Normal Row Count/Abnormal Rate/Normal Rate |
|
Statistical value (1-day volatility rate, 7-day volatility rate, 30-day volatility rate) | The system calculates volatility rates by comparing the current row count with historical data from 1, 7, and 30 days prior. These rates are then compared against a set threshold, and an alarm is triggered if any rule is not met. |
When the check metric is a rate, such as Normal Rate, Abnormal Rate, or Fluctuation Rate, you can select =NaN. This prevents an alert from being triggered when the denominator of the metric is 0 and the resulting rate is NaN.
Metric Parameter Configuration
Metric Rule Configuration
Template type | Description |
Uniqueness | Field Group Count Check / Field Duplicate Value Count Check: You must configure data filtering. Data filtering: Disabled by default. After you enable it, you can configure filtering conditions for the validation table, partition filtering, or general data filtering. These conditions are directly appended to the validation SQL. If the validation table requires partition filtering, we recommend that you configure a partition expression in the scheduling configuration. After you configure the expression, the quality report uses the validation partition as the finest viewing granularity. Enter the data filtering content, for example:
|
Stability | Field Stability Check/Field Fluctuation Check:
|
Metric Validation Configuration
Template type | Parameter | Description |
Uniqueness | Field Group Count | Compares the number of groups for the field with a specified fixed value. |
Statistic (Duplicate Row Count/Duplication Rate) |
| |
Stability | Statistic | The count of distinct values, which is the result of a |
Statistic (1-day, 7-day, 30-day fluctuation rate) | This check compares the current row count with counts from 1, 7, and 30 days ago to determine the fluctuation rate. An alert is triggered if this rate violates the configured threshold. | |
Average value fluctuation detection (7-day, 30-day) | The baseline value is the average row count over the last 7 or 30 days. This check compares the fluctuation of the current value against this baseline average. | |
Statistic (fluctuation rate vs. 1st of month/last month/last year) | Compares the current row count with counts from the first day of the current month, the previous month, and the previous year to determine the fluctuation rate. An alert is triggered if this rate violates the configured threshold. |
When the validation metric is a rate, such as normal rate, anomaly rate, or fluctuation rate, you can select the =NaN operator. This option prevents an alert from being triggered when the denominator metric is 0 and the rate evaluates to NaN (Not a Number).
Real-time Meta Table Parameters
Offline Link Comparison Parameters
An offline data link comparison quality rule detects discrepancies between real-time and offline data processed with the same statistical logic. Significant discrepancies can indicate data quality issues.
Parameter | Description |
Verification field | Select the field to verify. |
Metric operator | Select the algorithm for the data. |
Object form | Select single-value data or multi-value data. |
Time condition | Select the field for the time condition. |
Enable conditional limit | Select Enable or Disable to toggle the conditional limit. |
Offline data | Select an offline data table from the drop-down list. |
Offline data retrieval | Disabled by default. When enabled, use SQL to specify how data is retrieved from the offline data table. |
Time zone settings | Select a time zone from the drop-down list. |
Multi-link Comparison Parameters
In high-availability business scenarios, you can use real-time dual-link or real-time triple-link comparison quality rules to monitor data. If anomalies are detected, operators can promptly perform a failover or back up the data. Real-time multi-link comparison quality rules support monitoring for issues such as data lag and statistical deviation.
Parameter | Description |
Verification field | Select the field to verify. |
Metric operator | Select the algorithm for the data. |
Object form | Select single-value data or multi-value data. |
Time condition | Select the field for the time condition. |
Enable conditional limit | Select Enable or Disable to toggle the conditional limit. |
Number of comparison links | Select the comparison type: real-time triple-link comparison or real-time dual-link comparison. |
Comparison link 1/Comparison link 2 | Select the real-time meta table(s) for the comparison links:
|
Time zone settings | Select a time zone from the drop-down list. |
