ListQualityRules

更新时间:
复制 MD 格式

Retrieves quality rules that match a partition expression.

Note

This API has been deprecated. We recommend migrating to dataworks-public(2024-05-18) - GetDataQualityScan for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

ProjectName

string

Yes

The engine or data source name, as shown on the Data Source Configuration page.

autotest

EntityId

integer

Yes

The partition expression ID. Obtain this ID from the GetQualityEntity operation.

12345

PageNumber

integer

Yes

The page number.

1

PageSize

integer

Yes

Entries per page. Default: 10. Maximum: 20.

20

ProjectId

integer

Yes

The DataWorks workspace ID.

12345

Response elements

Element

Type

Description

Example

object

Response object.

HttpStatusCode

integer

The HTTP status code.

200

RequestId

string

The request ID.

38cbdef0-f6cf-49****

ErrorMessage

string

The error message.

You have no permission.

Success

boolean

Whether the request succeeded. Valid values:

  • true

  • false

true

ErrorCode

string

The error code.

Invalid.Tenant.ConnectionNotExists

Data

object

Paginated quality rules.

PageNumber

integer

The page number.

1

PageSize

integer

Entries per page. Valid values: 1 to 100. Default: 10.

20

TotalCount

integer

Total number of entries.

400

Rules

array<object>

Quality rule details.

object

Rule data.

BlockType

integer

The rule strength. Valid values:

  • 1: Strong rule. Triggers a critical alert and blocks task scheduling.

  • 0: Weak rule.

0

OnDutyAccountName

string

The Alibaba Cloud account name used to configure the rule.

test

Property

string

The field name.

id

WarningThreshold

string

The warning alert threshold, specifying the allowed deviation from the expected value.

10

TableName

string

The table name.

dual

OnDuty

string

The Alibaba Cloud account ID used to configure the rule.

1912****

Comment

string

The rule description.

Verify table rules

RuleCheckerRelationId

integer

The rule detail association ID.

132323

FixCheck

boolean

Whether a fixed value is used for the check.

true

MethodId

integer

The sampling method ID.

21

TemplateName

string

The monitoring template name.

Number of SQL task table rows, 1, 7, and 30 days wave detection

Trend

string

The monitoring result trend.

abs

HistoryWarningThreshold

string

The historical warning alert threshold.

history max:40%,history min:10%

RuleType

integer

The rule type. Valid values:

  • 0: System-created.

  • 1: User-created.

  • 2: Workspace-level.

0

MatchExpression

string

The partition filter expression.

dt=$[yyyymmdd]

ProjectName

string

The compute engine or data source name.

autotest

PropertyKey

string

Not used.

table_count

CriticalThreshold

string

The critical alert threshold, specifying the allowed deviation from the expected value. If a strong rule triggers a critical alert, task scheduling is blocked.

40

HistoryCriticalThreshold

string

The historical critical alert threshold.

history max:80%,history min:50%

MethodName

string

The sampling method name. Valid values: 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

CheckerId

integer

The checker ID.

7

EntityId

integer

The partition filter expression ID.

1234

ExpectValue

string

The expected value.

1000

TemplateId

integer

The monitoring template ID.

7

Id

integer

The monitoring rule ID.

1234

RuleName

string

The monitoring rule name.

test

Examples

Success response

JSON format

{
  "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": "Verify table rules",
        "RuleCheckerRelationId": 132323,
        "FixCheck": true,
        "MethodId": 21,
        "TemplateName": "Number of SQL task table rows, 1, 7, and 30 days wave detection",
        "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

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.