すべてのプロダクト
Search
ドキュメントセンター

DataWorks:UpdateDataQualityRule

最終更新日:Sep 03, 2026

Data Quality ルールを更新します。

説明

この API は廃止されました。一時的にアクセス可能ですが、更新やバグ修正対応は一切行われません。代わりに dataworks-public(2024-05-18) - UpdateDataQualityScan への移行を推奨します。より強化された機能に加え、サポートも引き続きご利用いただけます。

操作説明

You must purchase DataWorks Basic Edition or above to use this feature.

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

この操作の認証情報はありません。問題が発生した場合は、アカウントマネージャーにご連絡ください。

リクエストパラメーター

パラメーター

型

必須 / 任意

説明

例

Id

integer

必須

ルール ID。

100001

Name

string

任意

ルール名。名前は数字、英字、中国語文字、半角または全角の句読点の組み合わせで指定できます。最大値は 255 文字です。

表不能为空

Enabled

boolean

任意

ルールが有効かどうかを指定します。

true

Severity

string

任意

ビジネスに対するルールの重大度レベル(ページ上の強い/弱いルールに対応)。有効な値:

  • 法線

  • High。

High

Description

string

任意

ルールの説明。最大値は 500 文字です。

this is a odps _sql task

ProjectId

integer

必須

DataWorks ワークスペースの ID。DataWorks コンソールにログオンし、ワークスペース設定項目ページでワークスペース ID を取得できます。

10000

TemplateCode

string

任意

ルールがリファレンスするルールテンプレートの一意の識別子。

SYSTEM:table:table_count:fixed

SamplingConfig

object

任意

サンプルコレクションに必須の設定項目。

Metric

string

任意

The name of the metric to sample. This parameter is not required when a template is used.

  • Count: the number of rows in the table.

  • Min: the minimum value of the field.

  • Max: the maximum value of the field.

  • Avg: the average value of the field.

  • DistinctCount: the number of distinct values in the field.

  • DistinctPercent: the ratio of the number of distinct values in the field to the total number of rows.

  • DuplicatedCount: the number of duplicate values in the field.

  • DuplicatedPercent: the ratio of the number of duplicate values in the field to the total number of rows.

  • TableSize: the size of the table.

  • NullValueCount: the number of rows in which the field is null.

  • NullValuePercent: the percentage of rows in which the field is null.

  • GroupCount: the number of data rows for each value after aggregation by field value.

  • CountNotIn: the number of rows that do not match the enumerated values.

  • CountDistinctNotIn: the number of distinct values that do not match the enumerated values.

  • UserDefinedSql: sample collection by using custom SQL.

Min

MetricParameters

string

任意

The parameters required for sample collection.

{ "Columns": [ "id", "name" ] , "SQL": "select count(1) from table;"}

SettingConfig

string

任意

The runtime parameter setting statements to be inserted and executed before the actual sampling statements. The maximum length is 1,000 characters. Only MaxCompute is supported.

SET odps.sql.udf.timeout=600s; SET odps.sql.python.version=cp27;

SamplingFilter

string

任意

The condition used to apply secondary filtering on data that is not of interest during sampling. The maximum length is 16,777,215 characters.

id IS NULL

CheckingConfig

object

任意

サンプル検証の設定項目。

Type

string

任意

The threshold calculation method. This parameter is not required when a template is used.

  • Fixed

  • Fluctation

  • FluctationDiscreate

  • Auto

  • Average

  • Variance

Fixed

ReferencedSamplesFilter

string

任意

Some types of thresholds require querying reference samples and then aggregating the values of those reference samples to derive the threshold used for comparison. An expression is used here to indicate how the reference samples are queried.

{ "bizdate": [ "-1", "-7", "-1m" ] }

Thresholds

object

任意

The threshold settings.

Expected

object

任意

The expected threshold settings.

Operator

string

任意

The comparison operator. Valid values:

  • >

  • >=

  • <

  • <=

  • !=

  • =

>

Value

string

任意

The threshold value.

100.0

Expression

string

任意

The threshold expression.

The volatility type rule must use an expression to represent the volatility threshold. For example:

  • Fluctuation rise greater than 0.01: $checkValue > 0.01

  • Fluctuation drop greater than 0.01:$checkValue < -0.01

  • Absolute volatility: abs($checkValue) > 0.01

You can also use expressions to configure thresholds for fixed-Value rules. If you configure them at the same time, the expression priority is higher than Operator and Value.

$checkValue <= 0.01

Warned

object

任意

The threshold settings for normal warnings.

Operator

string

任意

The comparison operator. Valid values:

  • >

  • >=

  • <

  • <=

  • !=

  • =

>

Value

string

任意

The threshold value.

100.0

Expression

string

任意

The threshold expression.

The volatility type rule must use an expression to represent the volatility threshold. For example:

  • Fluctuation rise greater than 0.01: $checkValue > 0.01

  • Fluctuation drop greater than 0.01:$checkValue < -0.01

  • Absolute volatility: abs($checkValue) > 0.01

You can also use expressions to configure thresholds for fixed-Value rules. If you configure them at the same time, the expression priority is higher than Operator and Value.

$checkValue > 0.01

Critical

object

任意

The threshold settings for critical warnings.

Operator

string

任意

The comparison operator. Valid values:

  • >

  • >=

  • <

  • <=

  • !=

  • =

>

Value

string

任意

The threshold value.

100.0

Expression

string

任意

The threshold expression.

The volatility type rule must use an expression to represent the volatility threshold. For example:

  • Fluctuation rise greater than 0.01: $checkValue > 0.01

  • Fluctuation drop greater than 0.01:$checkValue < -0.01

  • Absolute volatility: abs($checkValue) > 0.01

You can also use expressions to configure thresholds for fixed-Value rules. If you configure them at the same time, the expression priority is higher than Operator and Value.

$checkValue > 0.05

ErrorHandlers

array<object>

任意

Data Quality ルール検証の発行ハンドラのリスト。

object

任意

An issue handler for data quality rule verification.

Type

string

任意

The handler type.

  • SaveErrorData

SaveErrorData

ErrorDataFilter

string

任意

For a custom SQL rule, you must specify the SQL used to filter problematic data.

SELECT * FROM tb_api_log WHERE id IS NULL

レスポンスフィールド

フィールド

型

説明

例

object

The returned data.

RequestId

string

Id of the request

691CA452-D37A-4ED0-9441

Success

boolean

Indicates whether the update was successful.

true

例

成功レスポンス

JSONJSON

{
  "RequestId": "691CA452-D37A-4ED0-9441\n",
  "Success": true
}

エラーコード

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。