Memperbarui tugas validasi kualitas data.
API ini telah ditinggalkan. Kami merekomendasikan migrasi ke dataworks-public(2024-05-18) - UpdateDataQualityScan 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.
Deskripsi operasi
DataWorks Basic Edition atau yang lebih tinggi harus dibeli untuk menggunakan operasi ini.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| Target |
object |
No |
Objek pemantauan kualitas data |
|
| DatabaseType |
string |
No |
Tipe database tempat tabel berada
|
maxcompute |
| TableGuid |
string |
No |
ID unik tabel di Data Map |
odsp.openapi.ods_d_openapi_log |
| PartitionSpec |
string |
No |
Pengaturan partisi pada tabel berpartisi |
dt=$[yyyymmdd-1] |
| Description |
string |
No |
Deskripsi tugas pemantauan kualitas |
OpenAPI data quality monitoring test. |
| Name |
string |
No |
Nama tugas pemantauan kualitas |
OpenAPI data quality monitoring test. |
| RuntimeConf |
string |
No |
Konfigurasi lanjutan. String berformat JSON. Hanya berlaku untuk pemantauan kualitas data tipe EMR.
|
{ "queue": "default", "sqlEngine": "SPARK_SQL" } |
| Trigger |
object |
No |
Konfigurasi pemicu pada tugas validasi kualitas data |
|
| Type |
string |
No |
Tipe pemicu pada tugas pemantauan kualitas.
|
ByScheduledTaskInstance |
| TaskIds |
array |
No |
Daftar ID tugas penjadwalan. Berlaku ketika Type bernilai ByScheduledTaskInstance. |
|
|
integer |
No |
ID node tugas penjadwalan |
1004979033 |
|
| ProjectId |
integer |
Yes |
ID Workspace |
10000 |
| Hooks |
array<object> |
No |
Pengaturan callback |
|
|
object |
No |
Hook |
||
| Type |
string |
No |
Aksi hook yang dijalankan setelah validasi kualitas data selesai.
|
ByScheduledTaskInstance |
| Condition |
string |
No |
Kondisi pemicu hook. Ketika kondisi ini terpenuhi, aksi hook akan dipicu. Saat ini, hanya dua jenis ekspresi kondisi yang didukung:
|
${severity} == "High" AND ${status} == "Critical" |
| Notifications |
object |
No |
Konfigurasi langganan notifikasi |
|
| Condition |
string |
No |
Kondisi pemicu notifikasi. Ketika kondisi ini terpenuhi, notifikasi pesan akan dipicu. Saat ini, hanya dua jenis ekspresi kondisi yang didukung:
|
${severity} == "High" AND ${status} == "Critical" |
| Notifications |
array<object> |
No |
Pengaturan notifikasi |
|
|
array<object> |
No |
Pengaturan notifikasi |
||
| NotificationReceivers |
array<object> |
No |
Pengaturan penerima peringatan |
|
|
object |
No |
Pengaturan penerima peringatan |
||
| ReceiverType |
string |
No |
The type of the alert recipient. Valid values:
Valid values:
|
DingdingUrl |
| Extension |
string |
No |
The additional parameters that are required when alerts are sent. The parameters are JSON-formatted strings. The following keys are supported:
|
{ "atAll": true } |
| ReceiverValues |
array |
No |
The alert recipient. |
|
|
string |
No |
The recipient.
|
https://api.fc.aliyuncs.com/webhook |
|
| NotificationChannels |
array<object> |
No |
Metode notifikasi |
|
|
object |
No |
Metode notifikasi |
||
| Channels |
array |
No |
The alert notification methods. |
|
|
string |
No |
The alert notification method. Valid values:
|
|
|
| DataSourceId |
integer |
No |
ID sumber data. Anda dapat memanggil ListDataSources untuk memperoleh ID sumber data. |
358750 |
| DataQualityRules |
array<object> |
No |
Daftar aturan kualitas data yang terkait dengan pemantauan kualitas data. |
|
|
array<object> |
No |
|||
| Name |
string |
No |
Nama aturan kualitas data. |
OpenAPI test rules |
| Enabled |
boolean |
No |
Apakah aturan kualitas data diaktifkan. |
true |
| Severity |
string |
No |
Tingkat severity aturan untuk bisnis (sesuai dengan aturan kuat/lemah pada halaman). Nilai enum opsional:
|
Normal |
| Description |
string |
No |
Deskripsi aturan kualitas data. |
OpenAPI test rules |
| TemplateCode |
string |
No |
Pengenal unik dari template aturan yang dirujuk oleh aturan. |
SYSTEM:field:null_value:fixed:0 |
| SamplingConfig |
object |
No |
Parameter yang diperlukan untuk pengumpulan sampel |
|
| Metric |
string |
No |
Nama metrik sampling
|
CountNotIn |
| MetricParameters |
string |
No |
Parameter yang diperlukan untuk pengumpulan sampel |
{ "Columns": [ "id", "name" ] , "SQL": "select count(1) from table;"} |
| SettingConfig |
string |
No |
Pernyataan pengaturan parameter runtime yang akan disisipkan dan dijalankan sebelum pernyataan sampling sebenarnya. Maksimum 1000 karakter. Saat ini hanya MaxCompute yang didukung. |
odps.sql.type.system.odps2=True,odps.sql.hive.compatible=True |
| SamplingFilter |
string |
No |
Kondisi untuk memfilter lebih lanjut data yang tidak relevan selama sampling. Maksimum 16777215 karakter. |
status != 'Succeeded' |
| CheckingConfig |
object |
No |
Pengaturan validasi sampel |
|
| Type |
string |
No |
Metode perhitungan threshold
|
Fixed |
| ReferencedSamplesFilter |
string |
No |
Beberapa tipe threshold memerlukan kueri sampel referensi dan kemudian mengagregasi nilainya untuk menurunkan threshold pembanding. Ekspresi digunakan di sini untuk menunjukkan bagaimana sampel referensi dikuerikan. |
{"bizdate": ["-1"]} |
| Thresholds |
object |
No |
Pengaturan threshold validasi. |
|
| Expected |
object |
No |
The expected threshold setting. |
|
| Operator |
string |
No |
The comparison operator. Valid values:
|
= |
| Value |
string |
No |
The threshold value. |
0 |
| Expression |
string |
No |
The threshold expression. If the template specified by the TemplateCode parameter is about fluctuation, you must use an expression to represent the threshold for fluctuation. Examples:
If the template specified by the TemplateCode parameter is about fixed value, you can also use an expression to represent the threshold. If you configure the Expression, Operator, and Value parameters for the threshold at the same time, the Expression parameter takes precedence over the Operator and Value parameters. |
$checkValue > 0.01 |
| Warned |
object |
No |
The threshold settings for normal alerts. |
|
| Operator |
string |
No |
The comparison operator. Valid values:
|
> |
| Value |
string |
No |
The threshold value. |
0.001 |
| Expression |
string |
No |
The threshold expression. If the template specified by the TemplateCode parameter is about fluctuation, you must use an expression to represent the threshold for fluctuation. Examples:
If the template specified by the TemplateCode parameter is about fixed value, you can also use an expression to represent the threshold. If you configure the Expression, Operator, and Value parameters for the threshold at the same time, the Expression parameter takes precedence over the Operator and Value parameters. |
$checkValue > 0.01 |
| Critical |
object |
No |
The threshold settings for critical alerts. |
|
| Operator |
string |
No |
The comparison operator. Valid values:
|
> |
| Value |
string |
No |
The threshold value. |
0.01 |
| Expression |
string |
No |
The threshold expression. If the template specified by the TemplateCode parameter is about fluctuation, you must use an expression to represent the threshold for fluctuation. Examples:
If the template specified by the TemplateCode parameter is about fixed value, you can also use an expression to represent the threshold. If you configure the Expression, Operator, and Value parameters for the threshold at the same time, the Expression parameter takes precedence over the Operator and Value parameters. |
$checkValue > 0.01 |
| ErrorHandlers |
array<object> |
No |
Handler masalah validasi aturan kualitas |
|
|
object |
No |
|||
| Type |
string |
No |
Tipe handler:
|
SaveErrorData |
| ErrorDataFilter |
string |
No |
Untuk aturan SQL kustom, pengguna harus menentukan SQL untuk memfilter data yang bermasalah. |
SELECT * FROM ods_d_openapi_log WHERE status = 'Error' |
| Id |
integer |
No |
ID aturan validasi. Anda dapat memanggil operasi ListQualityRules untuk memperoleh ID aturan. |
1022171560 |
| Id |
integer |
Yes |
ID pemantauan kualitas data. |
7227061794 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Schema Response |
||
| Success |
boolean |
Menunjukkan apakah request berhasil. |
true |
| RequestId |
string |
ID Request. Digunakan untuk menelusuri log dan memecahkan masalah. |
8abcb91f-d266-4073-b907-2ed670378ed1 |
Contoh
Respons sukses
JSONformat
{
"Success": true,
"RequestId": "8abcb91f-d266-4073-b907-2ed670378ed1"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.