Creating Data Quality Jobs

Entry

To create a quality job by a data connection, you must select a directory to store the data quality job. For details, see Figure 1.

Figure 1 Directory that stores the quality job to be created
Table 1 Buttons in navigation bar

No.

Description

1

Create Directory

2

Refresh Directory

3

Select All. You can right-click to create, delete, and rename directories.

Process

  1. 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.

  1. Click Data Quality Control of the corresponding workspace.

    The system navigates to the Data Quality Control console.

  1. Choose Quality Monitoring > Quality Job.
  2. Click Create. In the dialog box that is displayed, set related parameters. See Table 2 for details.
    Table 2 Quality job parameters

    Parameter

    Description

    Name

    The name of the data quality job, which contains 1 to 64 characters and consists of letters, numbers, and underscores (_).

    Description

    Information to better identify a data quality job. It cannot exceed 256 characters.

    Select Directory

    Directory for storing data quality jobs. 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.

  3. Click Next. Configure a data quality rule. See Table 3 for details. You can also add a monitoring rule to create a sub-rule. Then, click Batch Save. All created rules will be displayed in the created tables.
    Table 3 Parameters for configuring a rule template

    Parameter

    Sub-parameter

    Description

    Basic Info

    Rule Type

    Database rules. table rules, field rules. cross-field rules, and custom filed rules are rules configured for specific fields in a table. Set this parameter to a table-level rule. Other configuration items on the page are set to table-level rule configuration items.

    Object

    Data Connection Type

    Currently, only DWS, MRS Hive, DLI, RDS (MySQL and PostgreSQL), and ORACLE are supported.

    Data Connection

    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.

    Database

    Select a database to which the configured data quality rules are applied.

    NOTE:
    • The database is tailored to the created data connection.
    • When Rule Type is set to Database rule, set the data object to the corresponding database.

    Data Table

    Select the table to which the configured data quality rules apply.

    NOTE:
    • The data table is closely related to the database.
    • When Rule Type is set to Table rule, set the data object to the corresponding data table.

    Select Field

    Field in the data table to which the data quality rule applies.

    NOTE:

    When Rule Type is set to Field rule, set the data object to the field in the corresponding data table.

    Reference Data Object

    This parameter is mandatory when Rule Type is set to Cross-field rule. Set this parameter to the data field to be referenced.

    Rule Template

    Template Type

    Select a built-in or custom rule template.

    NOTE:

    The template type is closely related to the rule type.

    • If Rule Type is set to Database rule, the built-in template type is Null value scanning in databases.
    • If Rule Type is set to Table rule, the built-in template types are Table rows and Null value scan in tables.
    • If Rule Type is set to Field rule, the built-in template types are Phone number format verification, IP address verification, and Email address verification.
    • If Rule Type is set to Cross-field rule, the built-in template type is Field value consistency verification.
    • 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.

    Reference Data Object

    Reference Data Object

    Reference data needs to be configured for some rule templates, for example, specifying standard values. This parameter is valid only when Rule Type is set to Cross-field rule.

    Custom SQL

    SQL

    Enter a complete SQL statement to define how to monitor the data quality of data objects.

    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.

    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.

    Generate Anomaly Data

    Enable the Generate Anomaly Data function and click Select next to Anomaly Table to store the anomaly data that does not comply with the preset rules.

    NOTE:
    • The custom rule template does not support the generation of anomaly data.
    • For a field rule, the average value, total value, maximum value, and minimum value of a field in the field-level rule template cannot be used to generate anomaly data.

    Output Settings

    • Output Rule Settings: If you select this option, the quality job settings will show up in the anomaly tables so that users can view the anomaly data sources with ease.
    • Output null: If you select this option, and the preset rules are not complied, the null value will show up in anomaly tables.

    Anomaly Data Amount

    Users can select to export all anomaly data or the specified amount of anomaly data.

    View Rule

    Click this button and you can:

    • Determine the rule repetition based on tables and fields.
    • View the related sub-rules and quality jobs that already exist.

    Compute Engine

    Cluster type

    Select the engine for running the quality job.

    Object Scope

    Scanning Scope

    Determine 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.
  4. Click Next to set the Alarm Configuration. If the SMN notification needs to be received, enable Notification, and set Notification Type and Topic.
  5. 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.
    1. 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.
    2. 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.
    3. 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

    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. Currently, the start time is in minute for stagger scheduling.
      • 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.