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

DataWorks:ListDataQualityResults

最終更新日:Sep 03, 2026

ページングを使用して Data Quality の結果リストを照会します。

説明

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

操作説明

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

今すぐお試しください

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

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

dataworks:*

list

*All Resource

*

なし なし

リクエストパラメーター

パラメーター

型

必須 / 任意

説明

例

ProjectId

integer

必須

DataWorks ワークスペース ID。

100

DataQualityRuleId

integer

任意

Data Quality ルール ID。

100001

DataQualityEvaluationTaskId

integer

任意

Data Quality 評価タスク ID。

200001

DataQualityEvaluationTaskInstanceId

integer

任意

Data Quality 評価タスクインスタンス ID。

10001

CreateTimeFrom

integer

任意

Data Quality 評価結果がジェネレートされた最も早い時間。

1710239005403

CreateTimeTo

integer

任意

Data Quality 評価結果がジェネレートされた最も遅い時間。

1710239005403

BizdateFrom

string

任意

ルールインスタンスの開始業務日付。

2024-05-01

BizdateTo

string

任意

ルールインスタンスの終了業務日付。

2024-05-04

PageSize

integer

必須

ページングクエリのページサイズ。デフォルト値: 10。

10

PageNumber

integer

必須

ページングクエリのページ番号。デフォルト値: 1。

1

レスポンスフィールド

フィールド

型

説明

例

object

The returned value.

RequestId

string

The API request ID.

691CA452-D37A-****

PagingInfo

object

The paged query results of the data quality validation results.

PageNumber

integer

The page number.

1

PageSize

integer

The page size.

10

TotalCount

integer

The total number of entries.

219

DataQualityResults

array<object>

The list of quality validation results.

array<object>

The quality validation result.

Id

integer

The ID of the check result.

16033

Status

string

The status of the check result. Valid values:

  • Running

  • Error

  • Passed

  • Warned

  • Critical

Passed

CreateTime

integer

The time when the data quality check result was generated.

1708284916414

TaskInstanceId

integer

The ID of the instance generated by the check.

200001

Sample

string

The sample values used for the check.

[ { "gender": "male", "_count": 100 }, { "gender": "female", "_count": 100 } ]

Details

array<object>

The information about the data quality check.

object

The information about the data quality check.

ReferencedValue

string

The value that is calculated based on sample data. The value serves as a baseline value during the calculation of the value of the CheckedValue parameter.

0.0

CheckedValue

string

The value that is used for comparison with the threshold.

100.0

Status

string

The comparison result between the value of CheckedValue and the threshold. Valid values:

  • Error

  • Passed

  • Warned

  • Critical

Passed

Rule

object

The snapshot of the rule configuration when the check starts.

Id

integer

The rule ID.

100001

Name

string

The name of the rule. The name can be up to 255 characters in length and can contain digits, letters, and punctuation marks.

The table cannot be empty.

ProjectId

integer

The DataWorks workspace ID.

100

Enabled

boolean

Indicates whether the rule is enabled.

true

Severity

string

The strength of the rule. Valid values:

  • High

  • Normal

Normal

Description

string

The description of the rule. The description can be up to 500 characters in length.

this is a odps _sql task

TemplateCode

string

The code of the template that is referenced when you create a rule.

SYSTEM:user_defined_sql

Target

object

The monitored object of the rule.

Type

string

The type of the monitored object. Valid values:

  • Table

Table

DatabaseType

string

The type of the database to which the table belongs. Valid values:

  • maxcompute

  • emr

  • cdh

  • hologres

  • analyticdb_for_postgresql

  • analyticdb_for_mysql

  • starrocks

maxcompute

TableGuid

string

The ID of the table in Data Map.

odps.unit_test.tb_unit_test

SamplingConfig

object

The sampling settings.

Metric

string

The metrics used for sampling. Valid values:

  • 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 unique values of the field after deduplication.

  • DistinctPercent: the proportion of the number of unique values of the field after deduplication to the number of rows in the table.

  • DuplicatedCount: the number of duplicated values of the field.

  • DuplicatedPercent: the proportion of the number of duplicated values of the field to the number of rows in the table.

  • TableSize: the table size.

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

  • NullValuePercent: the proportion of the number of rows in which the field value is null to the number of rows in the table.

  • GroupCount: the field value and the number of rows for each field value.

  • CountNotIn: the number of rows in which the field values are different from the referenced values that you specified in the rule.

  • CountDistinctNotIn: the number of unique values that are different from the referenced values that you specified in the rule after deduplication.

  • UserDefinedSql: indicates that data is sampled by executing custom SQL statements.

Count

MetricParameters

string

The parameters required for sampling.

{ "columns": [ "id", "name" ] }

SettingConfig

string

The statements that are used to configure the parameters required for sampling before you execute the sampling statements. The statements can be up to 1,000 characters in length. Only the MaxCompute database is supported.

SET odps.sql.udf.timeout=600s;

SamplingFilter

string

The statements that are used to filter unnecessary data during sampling. The statements can be up to 16,777,215 characters in length.

id IS NULL

CheckingConfig

object

The check settings for sample data.

Type

string

The threshold calculation method. Valid values:

  • Fixed

  • Fluctation

  • FluctationDiscreate

  • Auto

  • Average

  • Variance

Fixed

ReferencedSamplesFilter

string

The method that is used to query the referenced samples. To obtain some types of thresholds, you need to query reference samples and perform aggregate operations on the reference values. In this example, an expression is used to indicate the query method of referenced samples.

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

Thresholds

object

The threshold settings.

Expected

object

The expected threshold setting.

Value

string

The threshold value.

100.0

Operator

string

The comparison operator. Valid values:

  • >

  • >=

  • <

  • <=

  • !=

  • =

>

Expression

string

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:

  • $checkValue > 0.01

  • $checkValue < -0.01

  • abs($checkValue) > 0.01

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

The threshold settings for normal alerts.

Value

string

The threshold value.

100.0

Operator

string

The comparison operator. Valid values:

  • >

  • >=

  • <

  • <=

  • !=

  • =

>

Expression

string

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:

  • $checkValue > 0.01

  • $checkValue < -0.01

  • abs($checkValue) > 0.01

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

The threshold settings for critical alerts.

Value

string

The threshold value.

100.0

Operator

string

The comparison operator. Valid values:

  • >

  • >=

  • <

  • <=

  • !=

  • =

>

Expression

string

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:

  • $checkValue > 0.01

  • $checkValue < -0.01

  • abs($checkValue) > 0.01

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>

The operations that you can perform after the rule-based check fails.

object

The operation that you can perform after the rule-based check fails.

Type

string

The type of the operation. Valid values:

  • SaveErrorData

SaveErrorData

ErrorDataFilter

string

The SQL statement that is used to filter failed tasks. If the rule is defined by custom SQL statements, you must specify an SQL statement to filter failed tasks.

SELECT * FROM tb_api_log WHERE id IS NULL

例

成功レスポンス

JSONJSON

{
  "RequestId": "691CA452-D37A-****",
  "PagingInfo": {
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 219,
    "DataQualityResults": [
      {
        "Id": 16033,
        "Status": "Passed",
        "CreateTime": 1708284916414,
        "TaskInstanceId": 200001,
        "Sample": "[\n  {\n    \"gender\": \"male\",\n    \"_count\": 100\n  }, {\n    \"gender\": \"female\",\n    \"_count\": 100\n  }\n]",
        "Details": [
          {
            "ReferencedValue": "0.0",
            "CheckedValue": "100.0",
            "Status": "Passed"
          }
        ],
        "Rule": {
          "Id": 100001,
          "Name": "The table cannot be empty.",
          "ProjectId": 100,
          "Enabled": true,
          "Severity": "Normal",
          "Description": "this is a odps _sql task",
          "TemplateCode": "SYSTEM:user_defined_sql",
          "Target": {
            "Type": "Table",
            "DatabaseType": "maxcompute",
            "TableGuid": "odps.unit_test.tb_unit_test"
          },
          "SamplingConfig": {
            "Metric": "Count",
            "MetricParameters": "{ \"columns\": [ \"id\", \"name\" ] }",
            "SettingConfig": "SET odps.sql.udf.timeout=600s; ",
            "SamplingFilter": "id IS NULL"
          },
          "CheckingConfig": {
            "Type": "Fixed",
            "ReferencedSamplesFilter": "{ \"bizdate\": [ \"-1\", \"-7\", \"-1m\" ] }",
            "Thresholds": {
              "Expected": {
                "Value": "100.0",
                "Operator": ">",
                "Expression": "$checkValue > 0.01"
              },
              "Warned": {
                "Value": "100.0",
                "Operator": ">",
                "Expression": " $checkValue > 0.01"
              },
              "Critical": {
                "Value": "100.0",
                "Operator": ">",
                "Expression": " $checkValue > 0.01"
              }
            }
          },
          "ErrorHandlers": [
            {
              "Type": "SaveErrorData\n",
              "ErrorDataFilter": "SELECT * FROM tb_api_log WHERE id IS NULL"
            }
          ]
        }
      }
    ]
  }
}

エラーコード

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

変更履歴

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