This topic describes how to configure a monitoring rule 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 Monitoring Rules page of the ods_log_info_d table.
    1. In the DataWorks console, click the DataWorks icon in the upper-left corner and choose All Products > Data Quality.
    2. On the Data Quality page, click Monitoring Rules in the left-side navigation pane. On the Monitoring Rules page, select EMR from the Engine/Data Source drop-down list.
    3. Click View Monitoring Rules in the Actions column of the ods_log_info_d table.
  2. Add a partition expression.
    1. On the page that appears, click + in the Partition Expression section.
    2. In the Add Partition dialog box that appears, set Partition Expression 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.
  3. Create a rule.
    1. Select the created partition expression and click Create rules at the top.
    2. In the Create rules dialog box that appears, click Add Monitoring Rule on the Template rules tab.
    3. Configure the monitoring rule.
      Parameter Description
      Rule Name The name of the monitoring rule.
      Field The field for which the monitoring rule is configured. Set the value to All Fields in Table(table).
      Template The template of the monitoring rule. Set the value to Number of rows, fixed value.
      Comparison Method The method of comparing values. Set the value to Greater Than.
      Expected Value The target value used together with the comparison method. Set the value to 0. In this case, you expect the actual value to be greater than 0.
      Rule Type The type of the monitoring rule. Set the value to Rule Type.
    4. Click Batch add.
  4. Test the monitoring rule.
    1. Click Test at the top of the page.
    2. In the Test dialog box that appears, set Data Timestamp and Resource Group, and click Test.
    3. After the test is completed, click The test is complete. Click to view the results. to view the test result.
  5. Link the monitoring rule to the output nodes of the ods_log_info_d table.
    1. On the Monitoring Rules page of the ods_log_info_d table, click Manage Linked Nodes at the top.
    2. In the Manage Linked Nodes dialog box, enter the IDs or names of the output nodes and click Create.
    3. Verify that Data Quality checks the data quality of a node instance after the instance is run.
  6. Configure subscriptions.
    1. On the Monitoring Rules page of the ods_log_info_d table, click Manage Subscriptions at the top.
    2. In the Manage Subscriptions dialog box, set Notification Method and Recipient.
      Currently, Data Quality supports the following four notification methods: Email, Email and SMS, DingTalk Chatbot, and DingTalk Chatbot @ALL.
    3. Click Save in the Actions column and then click Close. You can go to the My Subscriptions page to view your subscriptions and modify the subscription configuration.