This topic describes how to configure a monitoring rule to monitor the data quality of the ods_log_info_d table.
- Go to the Monitoring Rules page of the ods_log_info_d table.
- In the DataWorks console, click the DataWorks icon in the upper-left corner and choose .
- 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.
- Click View Monitoring Rules in the Actions column of the ods_log_info_d table.
- Add a partition expression.
- On the page that appears, click + in the Partition Expression section.
- In the Add Partition dialog box that appears, set Partition Expression to dt=$[yyyymmdd-1], and select the corresponding data quality wrapper.
- Click Verify to view the scheduling result.
- Verify that the scheduling result is correct and click OK.
- Create a rule.
- Select the created partition expression and click Create rules at the top.
- In the Create rules dialog box that appears, click Add Monitoring Rule on the Template rules tab.
- 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.
- Click Batch add.
- Test the monitoring rule.
- Click Test at the top of the page.
- In the Test dialog box that appears, set Data Timestamp and Resource Group, and click Test.
- After the test is completed, click The test is complete. Click to view the results. to view the test result.
- Link the monitoring rule to the output nodes of the ods_log_info_d table.
- On the Monitoring Rules page of the ods_log_info_d table, click Manage Linked Nodes at the top.
- In the Manage Linked Nodes dialog box, enter the IDs or names of the output nodes and click Create.
- Verify that Data Quality checks the data quality of a node instance after the instance is run.
- Configure subscriptions.
- On the Monitoring Rules page of the ods_log_info_d table, click Manage Subscriptions at the top.
- 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.
- 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.