All Products
Search
Document Center

:GetQualityRule

Last Updated:Jun 11, 2026

Mengambil informasi tentang aturan kualitas.

Catatan

API ini telah ditinggalkan. Kami merekomendasikan migrasi ke dataworks-public(2024-05-18) - GetDataQualityScan guna memperoleh fungsionalitas yang lebih baik dan dukungan berkelanjutan. Meskipun API yang telah ditinggalkan ini masih dapat diakses sementara, tidak akan ada pembaruan atau perbaikan bug lebih lanjut.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:*

get

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

RuleId

integer

Yes

ID aturan kualitas. Anda dapat memanggil operasi ListQualityRules untuk mendapatkan ID.

1234

ProjectName

string

Yes

Nama engine atau sumber data.

autotest

ProjectId

integer

No

ID ruang kerja DataWorks.

12345

Elemen respons

Element

Type

Description

Example

object

The response data structure.

HttpStatusCode

integer

The HTTP status code.

200

RequestId

string

The request ID.

576b9457-2cf5-4****

ErrorMessage

string

The error message.

You have no permission.

ErrorCode

string

The error code.

401

Success

boolean

Indicates whether the request was successful.

true

Data

object

The quality rule details.

BlockType

integer

The severity of the quality rule. Valid values:

  • 1: Strong Rule. If a Strong Rule triggers a critical Alert, the associated Scheduling Task is blocked.

  • 0: Weak Rule.

1

OnDutyAccountName

string

The name of the Alibaba Cloud account that configured the rule.

test

WarningThreshold

string

The threshold for a warning Alert. This value specifies the acceptable deviation from the Expected Value and can be customized.

10

Property

string

The column in the data source table to which the rule applies.

id

RuleType

integer

The type of the quality rule. Valid values:

  • 0: A rule based on a system template.

  • 1: A rule based on a custom SQL statement.

  • 4: A rule based on a custom template.

0

Comment

string

The comment for the rule.

Verify that the primary key is unique

OnDuty

string

The ID of the Alibaba Cloud account that configured the rule.

1822931****

Checker

integer

The checker ID, which is derived from a primary key and used for front-end identification.

9

FixCheck

boolean

Indicates whether to validate against a fixed value.

true

MethodId

integer

The ID of the method used to collect sample data.

8

CriticalThreshold

string

The threshold for a critical Alert, which defines the maximum acceptable deviation from the Expected Value. If this threshold is met for a Strong Rule, the associated Scheduling Task is blocked.

20

PredictType

integer

Indicates whether the threshold is dynamic. Valid values:

  • 0: The threshold is static.

  • 1: The threshold is dynamic.

0

TemplateName

string

The name of the template used.

SQL task table rows, 1,7, 30 days fluctuation test

CheckerName

string

The name of the checker.

compared with a fixed value

RuleName

string

The name of the rule.

View table fluctuations

MethodName

string

The name of the method used to collect sample data. Valid values include 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, and table_count-count_distinct.

table_count

EntityId

integer

The ID of the partition expression.

165523

WhereCondition

string

The filter condition or custom SQL statement used for validation.

id>10

Operator

string

The comparison operator.

>=

ExpectValue

string

The expected value.

30

Trend

string

The trend of the validation result.

abs

TemplateId

integer

The ID of the template used.

7

Id

integer

The ID of the rule.

123232

OpenSwitch

boolean

Indicates whether the rule is enabled.

true

TaskSetting

string

The variable settings inserted before a custom rule. The format is x=a,y=b.

x=a,y=b

Contoh

Respons sukses

JSONformat

{
  "HttpStatusCode": 200,
  "RequestId": "576b9457-2cf5-4****",
  "ErrorMessage": "You have no permission.",
  "ErrorCode": "401",
  "Success": true,
  "Data": {
    "BlockType": 1,
    "OnDutyAccountName": "test",
    "WarningThreshold": "10",
    "Property": "id",
    "RuleType": 0,
    "Comment": "Verify that the primary key is unique",
    "OnDuty": "1822931****",
    "Checker": 9,
    "FixCheck": true,
    "MethodId": 8,
    "CriticalThreshold": "20",
    "PredictType": 0,
    "TemplateName": "SQL task table rows, 1,7, 30 days fluctuation test",
    "CheckerName": "compared with a fixed value",
    "RuleName": "View table fluctuations",
    "MethodName": "table_count",
    "EntityId": 165523,
    "WhereCondition": "id>10",
    "Operator": ">=",
    "ExpectValue": "30",
    "Trend": "abs",
    "TemplateId": 7,
    "Id": 123232,
    "OpenSwitch": true,
    "TaskSetting": "x=a,y=b\n"
  }
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.