After you publish a model to the production environment, DataWorks Intelligent Data Modeling automatically generates data quality monitoring rules. This enables you to enforce data quality for the corresponding table in the production environment using the generated rules. This topic describes how to automatically generate data quality rules after publishing a table.
Prerequisites
You have published the table to the production environment. For more information about publishing tables, see Materialize logical models.
Notes
After you successfully publish a table to the production environment, DataWorks can automatically generate data quality rules for the following fields configured in the field management settings of the table:
Fields marked as Primary Key or Not Null.
Fields configured with Lookup Table to Associate.
Procedure
Publish a dimensional table
Log on to the DataWorks console. In the target region, click in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Data Modeling.
Click Dimensional Modeling in the top navigation bar to go to the Dimensional Modeling page. Select the table for which you want to configure data labeling, and double-click the table name to open its details page.
In the Field Management section, configure the following properties for the table fields: Primary Key, Not Null, and Field Association.
Click
to save the table, then click
to submit the table as a new model version.Click
to publish the table. In the Publish dialog box, configure the following settings:Effective Environment: Select both Production and Development.
Automatic Rule Generation Based on Field Standard: Select Yes.
Keep all other configuration items at their default values. After completing the configuration, click Publish to publish the table model.
View quality rules
Automatic bid disqualification rule generation
Click
Quality Rules in the top navigation bar to go to the Data Quality Rule page. Here, you can view the quality rules automatically generated by auto labeling. On the Data Labeling page, click Generate Data Quality Rule to automatically create the corresponding quality rules with one click. After clicking Generate Quality Rules for the dimensional table testtb, the system automatically creates two enabled soft rules: Field Rule - Unique - (id) (quality dimension: uniqueness; rule template: fixed value for number of duplicate values; monitoring thresholds: red alert if ≠ 0.0, green alert if = 0.0) and Field Rule - Not Null - (id) (quality dimension: completeness; rule template: fixed value for number of null values; monitoring thresholds: red alert if ≠ 0.0, green alert if = 0.0). The execution engine is MAXCOMPUTE, the runtime environment is PRODUCT, and the schema is default.
Manually configure rule generation
Click the Configure Monitoring button to go to . Click Create Rule to create a new rule. For more information, see Configure rules: by table (single table).
A Create from Rule Template panel appears on the right, offering three creation methods: + System Template Rule, + Custom Template Rule, and + Custom SQL. The system provides 63 templates, categorized by type into table row count, condition match rate, table size, number of null-value rows, number of duplicate-value rows, number of unique values, minimum value, maximum value, average value, aggregated value, enumeration values, discrete values, and custom SQL.
Generate quality monitoring
After configuring quality rules, go to the rule list page. Click the rule name in the ID/rule name column to navigate to the tab. Then, switch to the Monitor tab and perform the Create Monitor configuration. The detailed configuration is as follows:
Module | Configuration Item | Configuration Details |
Basic Configurations | Monitor Name | Enter a custom name for the quality monitoring job. |
Data Range | The timestamp range is generated by default based on the table type of the monitored object. If the monitored object is a partitioned table, the Data Range defaults to partition-based scope. You can select specific partitions, for example: | |
Running Settings | Trigger Method | Select one of the following options:
|
Associated Scheduling Node (Production Scheduling Trigger) | After clicking Add Node, select the workspace and node for which you want to create the quality monitoring job. Note In the DataWorks Operation Center, associate the quality monitoring job with a specified recurring schedule task. After the node runs, it automatically triggers the quality rules under this monitoring job. | |
Compute Resource Selection | Select the compute resources required to run quality rule checks. By default, the system selects the data source associated with the monitored table in the current workspace. If you select a different data source, ensure that the selected resource can access the table. | |
Handling Policies | Issue Strategy | Keep the default setting. |
Monitoring Rule | Click Batch Select. In the panel that appears, select the quality rules to include in the monitoring job by filtering on ID/rule name, Template, and Association Range. | |
You can view the most recent run record of a configured quality monitoring job and modify the subscription method and recipients for Subscribe to Alerts in .
If you enable and execute quality rules after generating them, note that running data quality rules incurs charges. For billing details, see Billing for Data Quality instances.
Modify or delete labeling rules
Modify or delete labeling rules from the data modeling side.
Update labeling rules by modifying field properties in the modeling interface—for example, changing the field name, changing a field from Not Null to not required, or updating the associated lookup table rule.
Add or delete fields to modify or remove labeling rules.
Delete the table model to modify or delete the fallback rule.
After modifying or deleting fields in the table model, click
to republish the table.