This topic describes how to configure rules to monitor the data quality of the ods_log_info_d table.

Prerequisites

The metadata is collected. For more information, see Collect and view metadata.

Procedure

  1. Go to the DataStudio page.
    1. Log on to the DataWorks console.
    2. In the left-side navigation pane, click Workspaces.
    3. In the top navigation bar, select the region where your workspace resides, find the workspace, and then click Data Analytics in the Actions column.
  2. Go to the Monitoring Rules page of the ods_log_info_d table.
    1. Click the Icon icon in the upper-left corner and choose All Products > Data Quality.
    2. In the left-side navigation pane, click Monitoring Rules. Select EMR from the Engine/Data Source drop-down list.
    3. Find the ods_log_info_d table and click View Monitoring Rules.
  3. Add a partition filter expression.
    1. Click + in the Partition Expression section.
    2. In the Add Partition dialog box, set the Partition Expression parameter to dt=$[yyyymmdd-1] and select the corresponding data quality wrapper.
    3. Click Verify to view the scheduling result.
    4. Verify that the scheduling result is correct and click OK.
  4. Create a monitoring rule.
    1. Select a partition and click Create rules in the upper-right corner.
    2. On the Template Rules tab, click Add Monitoring Rule.
    3. Configure the monitoring rule.
      Parameter Description
      Rule Name The name of the monitoring rule.
      Rule Type The type of the monitoring rule. Set this parameter to Rule Type.
      Auto-Generated Threshold Specifies whether to use dynamic thresholds. Set this parameter as needed.
      Note You can use the dynamic threshold feature only in DataWorks Enterprise Edition or more advanced editions.
      Rule Source Valid values: Built-in Template and Rule Templates.
      Note You can select Rule Templates only in DataWorks Enterprise Edition or more advanced editions.
      Field Set this parameter to All Fields in Table(table).
      Template Set this parameter to Number of rows, fixed value.
      Comparison Method Set this parameter to Greater Than.
      Expected Value Set this parameter to 0. In this case, you expect the actual value to be greater than 0.
    4. After the configuration is completed, click Batch Create.
  5. Test the monitoring rule.
    1. Click Test in the upper-right corner of the page.
    2. In the Test dialog box, set the Data Timestamp and Resource Group parameters and click Test.
    3. After the test is completed, click The test is complete. Click to view the results to go to the page of the test results.
  6. Link the monitoring rule to nodes.
    1. On the Monitoring Rules page of the ods_log_info_d table, click Manage Linked Nodes.
    2. In the Manage Linked Nodes dialog box, enter the IDs or names of the nodes and click Create.
    3. After the nodes are added, the monitoring rule is linked to the nodes. Verify that Data Quality checks the data quality of a node instance after the instance is run.
  7. Configure subscriptions.
    1. On the Monitoring Rules page of the ods_log_info_d table, click Manage Subscriptions.
    2. In the Manage Subscriptions dialog box, set the Notification Method and Recipient parameters.
      Data Quality supports the following notification methods: Email, Email and SMS, DingTalk Chatbot, and DingTalk Chatbot @ALL.
    3. After the configuration is completed, click Save. You can go to the My Subscriptions page to view your subscriptions and modify the subscription configuration.