Todos os produtos
Search
Central de documentação

DataWorks:ListQualityRules

Última atualização: Jun 29, 2026

Obtém as regras de qualidade que correspondem a uma expressão de partição.

Nota

Esta API foi descontinuada. Recomendamos migrar para dataworks-public(2024-05-18) - GetDataQualityScan para funcionalidade aprimorada e suporte contínuo. Embora a API descontinuada permaneça temporariamente acessível, nenhuma atualização ou correção de bugs será fornecida.

Experimente agora

Experimente esta API no OpenAPI Explorer, sem necessidade de assinatura manual. Chamadas bem-sucedidas geram automaticamente código SDK correspondente aos seus parâmetros. Faça o download com segurança de credenciais integrada para uso local.

Testar

Autorização RAM

Nenhuma autorização necessária para esta operação. Se você encontrar problemas com esta operação, entre em contato com o suporte técnico.

Parâmetros da solicitação

Parâmetro

Tipo

Obrigatório

Descrição

Exemplo

ProjectName

string

Sim

O nome do mecanismo ou da fonte de dados. Você pode encontrar este nome na página Configuração de Fonte de Dados.

autotest

EntityId

integer

Sim

O ID da expressão de partição. Chame a operação GetQualityEntity para obter este ID.

12345

PageNumber

integer

Sim

O número da página.

1

PageSize

integer

Sim

O número de entradas a serem retornadas por página. Valor padrão: 10. Máximo: 20.

20

ProjectId

integer

Sim

O ID do workspace do DataWorks.

12345

Elementos de resposta

Elemento

Tipo

Descrição

Exemplo

object

O objeto de resposta.

HttpStatusCode

integer

O código de status HTTP.

200

RequestId

string

O ID da solicitação.

38cbdef0-f6cf-49****

ErrorMessage

string

A mensagem de erro.

You have no permission.

Success

boolean

Indica se a solicitação foi bem-sucedida. Valores válidos:

  • true

  • false

true

ErrorCode

string

O código de erro.

Invalid.Tenant.ConnectionNotExists

Data

object

A lista paginada de regras de qualidade.

PageNumber

integer

O número da página.

1

PageSize

integer

O número de entradas por página. Um valor válido é de 1 a 100. Valor padrão: 10.

20

TotalCount

integer

O número total de entradas retornadas.

400

Rules

array<object>

Os detalhes da regra de qualidade.

object

Os dados retornados.

BlockType

integer

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 a monitoring rule as a strong rule based on your business requirements. If a strong rule is triggered, a critical alert is reported and the scheduling of the task is blocked.

0

OnDutyAccountName

string

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

test

Property

string

The name of the field.

id

WarningThreshold

string

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

10

TableName

string

The name of the table.

dual

OnDuty

string

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

1912****

Comment

string

The description of the monitoring rule.

Verify table rules

RuleCheckerRelationId

integer

The internal association ID for the rule details.

132323

FixCheck

boolean

Indicates whether a fixed value is used for the check.

true

MethodId

integer

The ID of the method used to collect sample data.

21

TemplateName

string

The name of the monitoring template.

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

Trend

string

The trend of the monitoring result.

abs

HistoryWarningThreshold

string

The historical threshold for a warning alert.

history max:40%,history min:10%

RuleType

integer

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

MatchExpression

string

The partition filter expression.

dt=$[yyyymmdd]

ProjectName

string

The name of the compute engine or data source.

autotest

PropertyKey

string

This parameter is not used. You can ignore this parameter.

table_count

CriticalThreshold

string

The threshold for a critical alert. The threshold specifies the deviation of a monitoring result from the expected value. You can customize the threshold based on your business requirements. If a strong rule is used and a critical alert is triggered, the scheduling of the task is blocked.

40

HistoryCriticalThreshold

string

The historical threshold for a critical alert.

history max:80%,history min:50%

MethodName

string

The name of the method 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

CheckerId

integer

The checker ID.

7

EntityId

integer

The ID of the partition filter expression.

1234

ExpectValue

string

The expected value.

1000

TemplateId

integer

The ID of the monitoring template.

7

Id

integer

The ID of the monitoring rule.

1234

RuleName

string

The name of the monitoring rule.

test

Exemplos

Resposta de sucesso

JSON formato

{
  "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"
      }
    ]
  }
}

Códigos de erro

Consulte Códigos de Erro para uma lista completa.

Notas de versão

Consulte Notas de Versão para uma lista completa.