Create Comparison Jobs
Prerequisites
To create a comparison job by a data connection, you must select a directory to store the comparison job. For details, see Figure 1.
For details on directory-related operations, see Table 1.
| No. | Description |
|---|---|
| 1 | Create Directory |
| 2 | Refresh Directory |
| 3 | Select All. You can right-click to create, delete, and rename directories. |
Create a Job
- Log in to the DGC console, select a DGC instance, and click Access.
On the displayed page, click the Workspaces tab. In the workspace list, locate the required workspace.
- Click Data Quality Control of the corresponding workspace.
The system navigates to the Data Quality Control console.
- Choose Quality Monitoring > Comparison Job from the left navigation bar.
- Click Create. In the dialog box that is displayed, set related parameters. See Table 2 for details.
Table 2 Parameters for creating a comparison job Parameter
Description
Job Name
The name of a comparison job, which can contain 1 to 64 characters and consist of letters, numbers, and underscores (_).
Description
Information to better identify a comparison job. It cannot exceed 256 characters.
Directory
The directory for storing the comparison job to be created. You can select a created directory. Figure 1 describes how to create a directory.
Job Level
Currently, the options are Warning, Minor, Major, and Critical. The job level determines the template for sending notification messages.
- Click Next. Configure a comparison rule. See Table 3 for details. You can also add a monitoring rule to create a sub-rule.
Table 3 Parameters for configuring a rule template Module
Parameter
Description
Configure Source
Rule Type
The options are Table rule, Field rule, and Custom rule. Field-level rules can be used to configure monitoring rules for specific fields in tables. For example, set this parameter to Table rule. Then, other configuration items on the page are set to table-level rule configuration items correspondingly.
The rule type of the destination object is automatically generated based on that of the source object.
Data Connection
Source and destination objects support the following data connection types: DWS, MRS Hive, DLI, ORACLE, and RDS (MySQL and PostgreSQL).
Select a created data connection from the drop-down list.
NOTE:Rules are based on data connections. Therefore, you need to create data connections in Management Center before creating data quality rules.
Mapping
The data table selected for the source object is compared with the data table of the destination object on the right. Select the table to which the configured comparison rule applies.
NOTE:The data table is closely related to the database. The database is tailored to the created data connection.
Rule Template
Template
This parameter defines how to monitor the data quality of data objects.
The template name of the source object contains the built-in rule template and custom rule template.
The template name of the destination object is automatically generated based on the rule type of the source object.
NOTE:The template type is closely related to the rule type. This parameter is displayed only when Rule Type is set to Table rule or Field rule.
- If Rule Type is set to Table rule, the built-in template types are Table rows and Null value scan in tables.
- When Rule Type is set to Field rule, the system has multiple built-in template types, such as Unique field value, Duplicate field value, Integrity, Accuracy, and Validity.
- In addition to built-in rule templates, you can also associate custom rule templates. For details on how to customize a rule template, see Creating Rule Templates.
Compute Engine
Cluster Name
Select the engine for running the comparison job.
Object Scope
Scanning Scope
Specify the scope that the created rule is applied to.
- If All is selected, all tables are scanned.
- If Partial is selected, you need to enter a where condition expression to precisely locate the partitions to query data.
Alarm Condition
Alarm Expression
Replace the Output Description variable defined in the rule template with the actual value and use the calculated result as the alarm condition.
- For example, the number of table rows is greater than 100.
- The supported logical operators including && (and) and || (or).
For example, table rows > 0 && unique values = 1 indicate that the number of table rows is greater than 0 and the number of unique values is 1;
table rows > 0 || unique values = 1 indicates that the number of table rows is greater than 0 or the number of unique values is 1.
Parameter
Set the alarm parameter of the alarm condition. The parameter value comes from the output of the rule template.
Logical Operator
Logical calculation is performed on multiple alarm parameters to form more complex alarm conditions.
- Click Next to set the subscription configuration. If the SMN notification needs to be received, enable Notification, and set Notification Type and Topic. See Figure 2.
- Click Next to go to a page where you can select a scheduling mode. Currently, Schedule once and Schedule periodically are supported. Set parameters for scheduling periodically by referring to Table 4.
- If Schedule once is selected, a manual task instance is generated. A manual task has no dependency on scheduling and needs to be manually triggered.
- If Schedule periodically is selected, a periodic instance is generated. A periodic instance is an instance snapshot that is automatically scheduled when a periodic task reaches the scheduled execution time.
- When a periodic task is scheduled once, an instance workflow is generated. You can perform routine O&M management on scheduled instance tasks, such as viewing the running status, stopping and rerunning the scheduled tasks.
Table 4 Parameters for setting the scheduling mode Parameter
Description
Effective Date
Effective date of a scheduling task
Scheduling Cycle
The frequency at which a scheduling task is executed. Related parameters are:
- Minute
- Hour
- Day
- Week NOTE:
- If Scheduling Cycle is set to Minute or Hour, you need to set Start Time, Time Interval, and End Time for the scheduling task.
- If Scheduling Cycle is set to Day, you need to set Specific Time for the scheduling task, namely, a specified time when the scheduling task is enabled every day.
- If Scheduling Cycle is set to Week, you need to set Scheduling Time and Specific Time for the scheduling task, that is, XX o'clock XX minutes on XXX every week.
Deleting a Job
- Log in to the DGC console, select a DGC instance, and click Access.
On the displayed page, click the Workspaces tab. In the workspace list, locate the required workspace.
- Click Data Quality Control of the corresponding workspace.
The system navigates to the Data Quality Control console.
- Choose Quality Monitoring > Comparison Job from the left navigation bar.
- Select the jobs you want to delete and click Delete in the upper part of the page. See Figure 3.
Deleted comparison jobs cannot be recovered. Exercise caution when performing this operation.
Running/Starting a Scheduling Job
- Log in to the DGC console, select a DGC instance, and click Access.
On the displayed page, click the Workspaces tab. In the workspace list, locate the required workspace.
- Click Data Quality Control of the corresponding workspace.
The system navigates to the Data Quality Control console.
- Choose Quality Monitoring > Comparison Job from the left navigation bar.
- Run or start the corresponding scheduling tasks. For details, see Figure 4.
Last Article: Creating Data Quality Jobs
Next Article: Viewing Rule Instances




Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.