This topic describes how to configure a monitoring rule in Data Quality for the dwd_log_info_di_emr table.
Prerequisites
Procedure
Go to the Data Quality page.
Log on to the DataWorks console. In the left-side navigation pane, choose . On the page that appears, select the desired workspace from the drop-down list and click Go to Data Quality.
Go to the rule configuration page for the dwd_log_info_di_emr table.
In the left-side navigation pane of the Data Quality page, choose
. You can specify the following conditions to find the desired table:Data source: E-MapReduce (EMR)
Database: current project in the production environment
Table: dwd_log_info_di_emr
Find the desired table in the search result and click Monitoring Setting in the Actions column to go to the rule configuration page of the table. The following section describes how to configure monitoring rules for the table.
Configure a partition filter expression.
On the rule configuration page of the table, click the icon next to Partition Filter Expression. The Add Partition dialog box is displayed.
In the Add Partition dialog box, set the Partition Filter Expression parameter to dt=$[yyyymmdd-1] and select a data quality plug-in.
Click Verify to check whether the calculation result is as expected. After you confirm the result, click OK.
Create a monitoring rule.
Click Create Rule. The Create Rule panel appears.
Click Add Monitoring Rule on the Template Rules tab, configure the parameters shown in the following table, and then click Batch Create.
Parameter
Description
Rule Name
The name of the monitoring rule.
Rule Type
The strength type of the monitoring rule. Set this parameter to Strong.
Auto-Generated Threshold
Specifies whether to use a dynamic threshold. Configure this parameter based on your business requirements.
NoteYou can use dynamic thresholds only in DataWorks Enterprise Edition or a more advanced edition.
Rule Source
The source for the monitoring rule. Valid values: Built-in Template and Rule Templates.
NoteYou can select Rule Templates only in DataWorks Enterprise Edition or a more advanced edition.
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, the actual expected value must be greater than 0.
Test the monitoring rule.
Click Test.
In the Test dialog box, configure the Data Timestamp and Resource Group parameters and click Test.
After the test run is complete, follow the on-screen instructions to view the test run result.
Associate the monitoring rule with a scheduling node.
On the rule configuration page of the table, click Manage Linked Nodes.
In the Manage Linked Nodes dialog box, enter a node name in the search box and click Create.
After the node is added, you can associate the node with the monitoring rule. After the node instance is run, the monitoring rule is triggered to check data quality.
Subscribe to the check result of the monitoring rule.
On the rule configuration page of the table, click Manage Subscriptions.
In the Manage Subscriptions dialog box, configure the Notification Method and Recipient parameters.
After the configuration is complete, click Save. Then, you can go to the My Subscriptions page to view your subscriptions and modify the subscription configuration.