Updated on 2023-10-24 GMT+08:00

Querying the Abnormal Data List

Function

This API is used to query the abnormal data list.

Constraints

This API can be used only in certain regions. For details, see Endpoints.

URI

GET /v5/{project_id}/jobs/{job_id}/dirty-data

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

For details, see Obtaining a Project ID.

job_id

Yes

String

Task ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

begin_time

No

Integer

Start time in UTC format, for example, 2020-09-01T18:50:20Z.

end_time

No

Integer

End time in UTC format, for example, 2020-09-01T19:50:20Z.

limit

No

String

Number of items displayed per page. The default value is 10. The value ranges from 1 to 1000.

Minimum value: 1

Maximum value: 1000

Default value: 10

offset

No

String

Offset, which is the position where the query starts. The value must be greater than or equal to 0. The default value is 0.

Default value: 0

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

MIME type of the request body. Use the default value application/json. For APIs used to upload objects or images, the value varies depending on the flow type.

The default value is application/json.

X-Auth-Token

Yes

String

User token obtained from IAM.

It is a response to the API for obtaining a user token. This API is the only one that does not require authentication.

After a request is processed, the value of X-Subject-Token in the header is the token value.

X-Language

No

String

Request language type.

Default value: en-us

Enumerated values:

  • en-us
  • zh-cn

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

count

Integer

Total number.

dirty_data_list

Array of objects

List of abnormal data.

For details, see Table 5.

Table 5 dirty_data_list parameters

Parameter

Type

Description

db_name

String

Database name.

schema_name

String

Schema name.

table_name

String

Table name.

error_sql

String

Abnormal SQL statement.

error_time

String

UTC time when an exception occurs, for example, 2023-06-10T03:01:52Z.

error_msg

String

Exception information.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum length: 12

Maximum length: 12

error_msg

String

Error message.

Minimum length: 1

Maximum length: 512

Example Request

Querying the abnormal data list

https://{endpoint}/v5/5237e10fe9aa4ad5b16b6a5245248314/jobs/163b98e8-6088-46c3-8b86-c18fea6jb502/dirty-data

Example Response

Status code: 200

OK
{
  "count": 1,
  "dirty_data_list": [
    {
      "db_name": "gltest01",
      "schema_name": "gltest",
      "table_name": "decimal_01",
      "error_sql": "INSERT INTO \"gltest\".\"decimal_01\" (\"c1\",\"c2\",\"c3\") VALUES (2,NULL,'2.000000000000000000000000000'::numeric)",
      "error_time": "2020-09-01T18:50:20.200Z",
      "error_msg": "ERROR: null value in column \"c2\" violates not-null constraint"
    }
  ]
}

Status code: 400

Bad Request

{
  "error_code": "DRS.M05003",
  "error_msg": "Task information not found."
}

Error Code

For details, see Error Code.