/get/job

URL: http://<db.host>:<db.port>/get/job

Get the status and result of asynchronously running job. See the /create/job for starting an asynchronous job. Some fields of the response are filled only after the submitted job has finished execution.

Input Parameter Description

NameTypeDescription
job_idlongA unique identifier for the job whose status and result is to be fetched.
optionsmap of string to strings

Optional parameters. The default value is an empty map ( {} ).

Supported Parameters (keys)Parameter Description
job_tagJob tag returned in call to create the job

Output Parameter Description

The GPUdb server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query. Here is a description of the various fields of the wrapper:

NameTypeDescription
statusString'OK' or 'ERROR'
messageStringEmpty if success or an error message
data_typeString'get_job_response' or 'none' in case of an error
dataStringEmpty string
data_strJSON or String

This embedded JSON represents the result of the /get/job endpoint:

NameTypeDescription
endpointstringThe endpoint which is being executed asynchronously. E.g. '/alter/table'.
job_statusstring

Status of the submitted job.

Possible ValuesDescription
RUNNINGThe job is currently executing.
DONEThe job execution has successfully completed and the response is included in the output parameter job_response or output parameter job_response_str field
ERRORThe job was attempted, but an error was encountered. The output parameter status_map contains the details of the error in error_message
CANCELLEDJob cancellation was requested while the execution was in progress.
runningbooleanTrue if the end point is still executing.
progressintApproximate percentage of the job completed.
successfulbooleanTrue if the job execution completed and no errors were encountered.
response_encodingstring

The encoding of the job result (contained in output parameter job_response or output parameter job_response_str.

Possible ValuesDescription
binaryThe job result is binary-encoded. It is contained in output parameter job_response.
jsonThe job result is json-encoded. It is contained in output parameter job_response_str.
job_responsebytesThe binary-encoded response of the job. This field is populated only when the job has completed and output parameter response_encoding is binary
job_response_strstringThe json-encoded response of the job. This field is populated only when the job has completed and output parameter response_encoding is json
status_mapmap of string to strings

Map of various status strings for the executed job.

Possible Parameters (keys)Parameter Description
error_messageExplains what error occurred while running the job asynchronously. This entry only exists when the job status is ERROR.
infomap of string to stringsAdditional information.

Empty string in case of an error.