All Products
Search
Document Center

DataWorks:ListQualityRules

Last Updated:Sep 18, 2024

Queries monitoring rules based on a partition filter expression.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectNamestringYes

The name of the compute engine or data source. You can obtain the name from data source configurations.

autotest
EntityIdlongYes

The ID of the partition filter expression. You can call the GetQualityEntity operation to query the ID of the partition filter expression.

1234
PageNumberintegerYes

The page number.

1
PageSizeintegerYes

The number of entries per page. Default value: 10. Maximum value: 20.

20
ProjectIdlongYes

The DataWorks workspace ID.

12345

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

HttpStatusCodeinteger

The HTTP status code.

200
RequestIdstring

The request ID. You can troubleshoot errors based on the ID.

38cbdef0-f6cf-49****
ErrorMessagestring

The error message.

You have no permission.
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
ErrorCodestring

The error code.

Invalid.Tenant.ConnectionNotExists
Dataobject

The list of monitoring rules.

PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page. Default value: 10. Maximum value: 100.

20
TotalCountlong

The total number of entries returned.

400
Rulesarray<object>

The details of the monitoring rule.

object
BlockTypeinteger

The strength of the monitoring rule. The strength of a monitoring rule indicates the importance of the rule. Valid values:

  • 1: The monitoring rule is a strong rule.
  • 0: The monitoring rule is a weak rule. You can specify the strength of a monitoring rule based on your business requirements. If a monitoring rule is a strong rule and the critical threshold is exceeded, a critical alert is reported and tasks that are associated with the rule are blocked from running.
0
OnDutyAccountNamestring

The name of the Alibaba Cloud account that is used to configure the monitoring rule.

test
Propertystring

The name of the field.

id
WarningThresholdstring

The threshold for a warning alert. The threshold specifies the deviation of the monitoring result from the expected value. You can specify a custom value for the threshold based on your business requirements.

10
TableNamestring

The name of the table.

dual
OnDutystring

The name of the Alibaba Cloud account that is used to configure the monitoring rule.

1912****
Commentstring

The description of the system defense rule.

RuleCheckerRelationIdinteger

The ID of the task that is associated with the partition filter expression.

132323
FixCheckboolean

Indicates whether the monitoring is performed based on a fixed value.

true
MethodIdinteger

The ID of the task that is associated with the partition filter expression.

21
TemplateNamestring

The name of the monitoring template.

Trendstring

The trend of the monitoring result.

abs
HistoryWarningThresholdstring

The historical threshold for a warning alert.

history max:40%,history min:10%
RuleTypeinteger

The type of the monitoring rule. Valid values:

  • 0: The monitoring rule is created by the system.
  • 1: The monitoring rule is created by a user.
  • 2: The monitoring rule is a workspace-level rule.
0
MatchExpressionstring

The partition filter expression.

dt=$[yyyymmdd]
ProjectNamestring

The name of the compute engine or data source.

autotest
PropertyKeystring

The field that is used to associate with monitoring rules at the frontend. This parameter can be ignored.

table_count
CriticalThresholdstring

The threshold for a critical alert. The threshold indicates the deviation of the monitoring result from the expected value. You can specify a custom value for the threshold based on your business requirements. If a monitoring rule is a strong rule and the critical threshold is exceeded, a critical alert is reported and tasks that are associated with the rule are blocked from running.

40
HistoryCriticalThresholdstring

The historical threshold for a critical alert.

history max:80%,history min:50%
MethodNamestring

The method that is used to collect sample data, such as avg, count, sum, min, max, count_distinct, user_defined, table_count, table_size, table_dt_load_count, table_dt_refuseload_count, null_value, null_value/table_count, (table_count-count_distinct)/table_count, or table_count-count_distinct.

count/table_count
CheckerIdinteger

The checker ID.

7
EntityIdinteger

The ID of the partition filter expression.

1234
ExpectValuestring

The expected value.

1000
TemplateIdinteger

The ID of the monitoring template.

7
Idinteger

The monitoring rule ID.

1234
RuleNamestring

The name of the monitoring rule.

test

Examples

Sample success responses

JSONformat

{
  "HttpStatusCode": 200,
  "RequestId": "38cbdef0-f6cf-49****",
  "ErrorMessage": "You have no permission.",
  "Success": true,
  "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
  "Data": {
    "PageNumber": 1,
    "PageSize": 20,
    "TotalCount": 400,
    "Rules": [
      {
        "BlockType": 0,
        "OnDutyAccountName": "test",
        "Property": "id",
        "WarningThreshold": "10",
        "TableName": "dual",
        "OnDuty": "1912****",
        "Comment": "",
        "RuleCheckerRelationId": 132323,
        "FixCheck": true,
        "MethodId": 21,
        "TemplateName": "",
        "Trend": "abs",
        "HistoryWarningThreshold": "history max:40%,history min:10%",
        "RuleType": 0,
        "MatchExpression": "dt=$[yyyymmdd]",
        "ProjectName": "autotest",
        "PropertyKey": "table_count",
        "CriticalThreshold": "40",
        "HistoryCriticalThreshold": "history max:80%,history min:50%",
        "MethodName": "count/table_count",
        "CheckerId": 7,
        "EntityId": 1234,
        "ExpectValue": "1000",
        "TemplateId": 7,
        "Id": 1234,
        "RuleName": "test"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-01-22The response structure of the API has changedView Change Details
2023-07-11The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-03-08The request parameters of the API has changedView Change Details
2021-10-26The response structure of the API has changedView Change Details