Querying the Job Execution Result-Method 1 (Discarded)
Function
This API is used to view the job execution result after a job is executed using SQL query statements. Currently, you can only query execution results of jobs of the QUERY type.
- This API has been discarded and is not recommended.
- You can view the first 1000 result records only. To view all result records, export them first. For details, see Exporting Query Results.
URI
- URI format
GET/v1.0/{project_id}/queues/{queue_name}/jobs/{job_id}?page-size=size¤t-page=page_number
- Parameter description
Table 1 URI parameters Parameter
Mandatory
Description
project_id
Yes
Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.
queue_name
Yes
Current queue name. SQL uses resources of the current queue for computing.
job_id
Yes
Job ID.
page-size
No
Maximum number of lines displayed on each page. The value range is as follows: [1, 100]. The default value is 50.
current-page
No
Current page number. The default value is 1.
Request
None
Response
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_success |
No |
Boolean |
Whether the request is successfully executed. Value true indicates that the request is successfully executed. |
message |
No |
String |
System prompt. If execution succeeds, the parameter setting may be left blank. |
job_id |
No |
String |
Job ID. |
job_type |
No |
String |
Job type, including DDL, DCL, IMPORT, EXPORT, QUERY, and INSERT. Currently, you can only query execution results of jobs of the QUERY type. |
row_count |
No |
Integer |
Total number of job results. |
input_size |
No |
Long |
Amount of data scanned during job execution. |
schema |
No |
Array of Map |
Name and type of the job result column. |
rows |
No |
Array of objects |
Job results set. |
Example
- Example request
None
- Example response (successful request)
{ "is_success": true, "message": "", "job_id": "ead0b276-8ed4-4eb5-b520-58f1511e7033", "job_type": "QUERY", "row_count": 1, "input_size": 74, "schema": [ { "c1": "int" }, { "c2": "string" } ], "rows": [ [ 23, "sda" ] ] }
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot