All Products
Search
Document Center

DataWorks:ListQualityResultsByEntity

Last Updated:Oct 17, 2024

Queries a list of historical check results based on a partition filter expression.

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
EntityIdintegerYes

The ID of the partition filter expression. You can call the GetQualityEntity operation to query the ID of the partition filter expression.

152322134
StartDatestringYes

The beginning of the time range to query. Specify the time in the yyyy-MM-dd HH:mm:ss format.

2020-09-20 00:00:00
EndDatestringYes

The end of the time range to query. Specify the time in the yyyy-MM-dd HH:mm:ss format.

2020-09-21 00:00:00
PageSizeintegerYes

The number of entries per page. Default value: 10. Maximum value: 20.

10
PageNumberintegerYes

The page number.

1
ProjectNamestringYes

The name of the compute engine or data source. You can obtain the name from data source configurations.

autotest
ProjectIdlongYes

The DataWorks workspace ID.

12345

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

HttpStatusCodeinteger

The HTTP status code.

200
ErrorMessagestring

The error message.

You have no permission.
RequestIdstring

The request ID.

CBA58543-00D4-41****
Successboolean

Indicates whether the request was successful.

true
ErrorCodestring

The error code.

401
Dataobject

The data structure of the check results.

PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page. Default value: 10. Maximum value: 100.

10
TotalCountlong

The total number of entries returned.

50
RuleChecksarray<object>

The returned check results.

RuleChecksobject
BlockTypeinteger

The strength of the monitoring rule. The strength of a monitoring rule indicates the importance of the rule. Valid values:

  • 1: the monitoring rule is a strong rule.
  • 0: the monitoring rule is a weak rule. You can specify whether a monitoring rule is a strong rule based on your business requirements. If a monitoring rule is a strong rule and the critical threshold is exceeded, a critical alert is reported and tasks that are associated with the rule are blocked from running.
0
WarningThresholdfloat

The threshold for a warning alert. The threshold indicates the deviation of the check result from the expected value. You can customize this threshold based on your business requirements.

0.1
Propertystring

The field whose data quality is checked based on the monitoring rule. This field is a column in the data source table that is monitored.

type
TableNamestring

The name of the table that is monitored.

dual
Commentstring

The description of the monitoring rule.

CheckResultStatusinteger

The check result of the monitoring rule. Valid values:

  • 0: indicates that the data source table is normal.
  • 1: indicates that a warning alert is reported.
  • 2: indicates that a critical alert is reported.
0
TemplateNamestring

The name of the monitoring template.

CheckerNamestring

The name of the checker.

fulx
RuleIdinteger

The ID of the monitoring rule.

123123232
FixedCheckboolean

Indicates whether the monitoring is performed based on a fixed value. Valid values:

  • true
  • false
false
Opstring

The comparison operator.

>
UpperValuefloat

The upper limit of the predicted result. The value of this parameter is automatically generated based on the threshold that you specify.

25555
ActualExpressionstring

The monitored partition in the data source table.

ds=20200912
ExternalIdstring

The node ID.

1112323123
TimeCoststring

The time that was taken to run the monitoring task. Unit: seconds.

202
Trendstring

The trend of the check result.

abs
ExternalTypestring

The type of the scheduling system. Only CWF scheduling systems are supported.

CWF2
BizDatelong

The data timestamp. In most cases, if the monitored business entity is offline data, the value is one day before the monitoring is performed.

1600704000000
CheckResultinteger

The check result. The value of this parameter is the same as the value of the CheckResultStatus parameter. Valid values:

  • 0: indicates that the data source table is normal.
  • 1: indicates that a warning alert is reported.
  • 2: indicates that a critical alert is reported.
0
ResultStringstring

The string of the check result.

test
MatchExpressionstring

The partition filter expression.

ds=$[yyyymmdd]
CheckerTypeinteger

The check type. Valid values:

  • 0: indicates that the monitoring is performed based on a fixed value.
  • 1: indicates that the monitoring is performed based on a non-fixed value.
  • 2: indicates that the monitoring is performed based on a dynamic threshold.
1
ProjectNamestring

The name of the compute engine or data source for which data quality is monitored.

autotest
BeginTimelong

The time when the monitoring started.

1600704000000
DateTypestring

The scheduling frequency. In most cases, the value of this parameter is YMD. This value indicates year, month, and day.

YMD
CriticalThresholdfloat

The threshold for a critical alert. The threshold indicates the deviation of the check result from the expected value. You can specify a value for the threshold based on your business requirements. If a monitoring rule is a strong rule and the critical threshold is exceeded, a critical alert is reported and tasks that are associated with the rule are blocked from running.

0.5
IsPredictionboolean

Indicates whether the check result is the same as the predicted result. Valid values:

  • true
  • false
true
RuleNamestring

The name of the monitoring rule.

CheckerIdinteger

The checker ID.

7
DiscreteCheckboolean

Indicates whether the monitoring is discrete monitoring. Valid values:

  • true
  • false
true
EndTimelong

The deadline for querying the check result.

1600704000000
MethodNamestring

The method used to collect sample data, such as such as 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, or table_count-count_distinct.

count_distinct
LowerValuefloat

The lower limit of the predicted result. The value of this parameter is automatically generated based on the threshold that you specify.

2344
EntityIdinteger

The ID of the partition filter expression.

15432322
WhereConditionstring

The filter condition of the monitoring rule.

id>0
ExpectValuefloat

The expected value.

200
TemplateIdinteger

The ID of the monitoring template.

5
TaskIdstring

The monitoring task ID.

16008552981681a0d6****
Idinteger

The primary key ID.

121212121
ReferenceValuearray<object>

The historical sample values.

ReferenceValueobject
DiscretePropertystring

The values of the sample field that are grouped by using the GROUP BY clause. For example, the values of the Gender field are grouped by using the GROUP BY clause. In this case, the values of the DiscreteProperty parameter are Male, Female, and null.

0
Valuefloat

The check value.

19
BizDatestring

The data timestamp. In most cases, if the monitored business entity is offline data, the value is one day before the monitoring is performed.

2020-12-03
SingleCheckResultinteger

The check result.

0
Thresholdfloat

The threshold.

0.5
SampleValuearray<object>

The current sample value.

SampleValueobject
DiscretePropertystring

The values of the sample field that are grouped by using the GROUP BY clause. For example, the values of the Gender field are grouped by using the GROUP BY clause. In this case, the values of the DiscreteProperty parameter are Male, Female, and null.

0
BizDatestring

The data timestamp. In most cases, if the monitored business entity is offline data, the value is one day before the monitoring is performed.

2020-12-03
Valuefloat

The current sample value.

19

Examples

Sample success responses

JSONformat

{
  "HttpStatusCode": 200,
  "ErrorMessage": "You have no permission.",
  "RequestId": "CBA58543-00D4-41****",
  "Success": true,
  "ErrorCode": "401",
  "Data": {
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 50,
    "RuleChecks": [
      {
        "BlockType": 0,
        "WarningThreshold": 0.1,
        "Property": "type",
        "TableName": "dual",
        "Comment": "",
        "CheckResultStatus": 0,
        "TemplateName": "",
        "CheckerName": "fulx",
        "RuleId": 123123232,
        "FixedCheck": false,
        "Op": ">",
        "UpperValue": 25555,
        "ActualExpression": "ds=20200912",
        "ExternalId": "1112323123",
        "TimeCost": "202",
        "Trend": "abs",
        "ExternalType": "CWF2",
        "BizDate": 1600704000000,
        "CheckResult": 0,
        "ResultString": "test",
        "MatchExpression": "ds=$[yyyymmdd]",
        "CheckerType": 1,
        "ProjectName": "autotest",
        "BeginTime": 1600704000000,
        "DateType": "YMD",
        "CriticalThreshold": 0.5,
        "IsPrediction": true,
        "RuleName": "",
        "CheckerId": 7,
        "DiscreteCheck": true,
        "EndTime": 1600704000000,
        "MethodName": "count_distinct",
        "LowerValue": 2344,
        "EntityId": 15432322,
        "WhereCondition": "id>0",
        "ExpectValue": 200,
        "TemplateId": 5,
        "TaskId": "16008552981681a0d6****",
        "Id": 121212121,
        "ReferenceValue": [
          {
            "DiscreteProperty": "0",
            "Value": 19,
            "BizDate": "2020-12-03",
            "SingleCheckResult": 0,
            "Threshold": 0.5
          }
        ],
        "SampleValue": [
          {
            "DiscreteProperty": "0",
            "BizDate": "2020-12-03",
            "Value": 19
          }
        ]
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-01-22The response structure of the API has changedView Change Details
2023-03-08The request parameters of the API has changedView Change Details