All Products
Search
Document Center

DataWorks:GetDataQualityRule

Last Updated:Dec 05, 2024

Queries the information about a data quality monitoring rule.

Operation description

This API operation is available for all DataWorks editions.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
The current API does not require request parameters

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

DataQualityRuleobject

The information about the rule.

CheckingConfigobject

The check settings for sample data.

Thresholdsobject

The threshold settings.

Expectedobject

The expected threshold setting.

Expressionstring

The threshold expression.

$checkValue <= 0.01
Warnedobject

The threshold settings for normal alerts.

Expressionstring

The threshold expression.

$checkValue > 0.01
Criticalobject

The threshold settings for critical alerts.

Expressionstring

The threshold expression.

$checkValue > 0.05

Examples

Sample success responses

JSONformat

{
  "RequestId": "691CA452-D37A-4ED0-9441\n",
  "DataQualityRule": {
    "Id": 16033,
    "Name": "",
    "TenantId": 228248921215042,
    "ProjectId": 1948,
    "Enabled": true,
    "Severity": "High",
    "Description": "this is a odps _sql task\n",
    "Target": {
      "Type": "Table",
      "DatabaseType": "maxcompute",
      "TableGuid": "odps.unit_test.tb_unit_test\n",
      "PartitionSpec": "ds=$[yyyymmdd-1]\n"
    },
    "TemplateCode": "system::user_defined\n",
    "SamplingConfig": {
      "Metric": "Max",
      "MetricParameters": "{ \"Columns\": [ \"id\", \"name\" ] , \"SQL\": \"select count(1) from table;\"}",
      "SettingConfig": "SET odps.sql.udf.timeout=600s; \nSET odps.sql.python.version=cp27;\n",
      "SamplingFilter": "id IS NULL\n"
    },
    "CheckingConfig": {
      "Type": "Fixed",
      "ReferencedSamplesFilter": "{ \"bizdate\": [ \"-1\", \"-7\", \"-1m\" ] }\n",
      "Thresholds": {
        "Expected": {
          "Operator": ">",
          "Value": "100.0",
          "Expression": "$checkValue <= 0.01"
        },
        "Warned": {
          "Operator": ">",
          "Value": "100.0",
          "Expression": "$checkValue > 0.01"
        },
        "Critical": {
          "Operator": ">",
          "Value": "100.0",
          "Expression": "$checkValue > 0.05"
        }
      }
    },
    "ErrorHandlers": [
      {
        "Type": "SaveErrorData\n",
        "ErrorDataFilter": "SELECT * FROM tb_api_log WHERE id IS NULL\n"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history