Querying Job Status
Function
This API is used to query the status of a submitted job.
URI
- Parameter description
Table 1 URI parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Definition
Project ID, which is used for resource isolation. For how to obtain a project ID, see Obtaining a Project ID.
Example: 48cc2c48765f481480c7db940d6409d1
Constraints
None
Range
The value can contain up to 64 characters. Only letters and digits are allowed.
Default Value
None
job_id
Yes
String
Definition
Job ID. For details about how to obtain a job ID, see Querying Job Details.
Example: 6d2146a0-c2d5-41bd-8ca0-ca9694ada992
Constraints
None
Range
The value can contain up to 64 characters. Only letters and digits are allowed.
Default Value
None
Request Parameters
None
Response Parameters
Parameter |
Type |
Description |
---|---|---|
is_success |
Boolean |
Definition Whether the request is successfully executed Range true indicates that the request is successfully executed. false indicates that the request fails to be executed. |
message |
String |
Definition System prompt. If the execution succeeds, this parameter is left blank. Range None |
job_id |
String |
Definition Job ID Range None |
job_type |
String |
Definition Job type Range The options are DDL, DCL, IMPORT, EXPORT, QUERY, INSERT, DATA_MIGRATION, UPDATE, DELETE, RESTART_QUEUE, and SCALE_QUEUE.
|
job_mode |
String |
Definition Job execution mode Range
|
queue_name |
String |
Definition Name of the queue where the job is submitted Range None |
owner |
String |
Definition User who submits a job Range None |
start_time |
Long |
Definition Time when a job is started. The timestamp is in milliseconds. Range None |
duration |
Long |
Definition Job running duration, in milliseconds. Range None |
status |
String |
Definition Job status Range
|
input_row_count |
Long |
Definition Number of records scanned during the Insert job execution Range None |
bad_row_count |
Long |
Definition Number of error records scanned during the Insert job execution Range None |
input_size |
Long |
Definition Size of files scanned during job execution, in bytes Range None |
result_count |
Integer |
Definition Total number of records returned by the current job or total number of records inserted by the Insert job. Range None |
database_name |
String |
Definition Name of the database where the target table resides. database_name is valid only for jobs of the IMPORT EXPORT, and QUERY types. Range None |
table_name |
String |
Definition Name of the target table. table_name is valid only for jobs of the IMPORT EXPORT, and QUERY types. Range None |
detail |
String |
Definition JSON string for information about related columns Default Value None |
statement |
String |
Definition SQL statements of a job Range None |
tags |
Array of objects |
Definition Job tags. For details, see Table 3. Range None |
user_conf |
String |
Definition Spark parameters configured when a user submits a SQL job. Range You can set the parameter in key-value pairs. For details about the supported configuration items, see Table 3. |
result_format |
String |
Definition Storage format of job results Range Currently, only CSV is supported. |
result_path |
String |
Definition OBS path of job results Range None |
execution_details_path |
String |
Definition OBS path of the job query execution plan. Range None |
Example Request
None
Example Response
{ "is_success": true, "message": "", "job_id": "208b08d4-0dc2-4dd7-8879-ddd4c020d7aa", "job_type": "QUERY", "job_mode":"async", "queue_name": "default", "owner": "test", "start_time": 1509335108918, "duration": 2523, "status": "FINISHED", "input_size": 22, "result_count": 4, "database_name":"dbtest", "table_name":"tbtest", "detail": "{\"type\":\"struct\",\"fields\":[{\"name\":\"id\",\"type\":\"integer\",\"nullable\":true,\"metadata\":{}},{\"name\":\"name\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}}]}", "statement": "select * from t1" }
Status Codes
Table 4 describes the status code.
Error Codes
If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.