GET /job

Retrieve information about a job.

Syntax

Operation URI
Retrieves a job's status. GET /api/v3/job/{id}
Retrieve results for a completed job. GET /api/v3/job/{id}/results?offset={offset}&limit={limit}

When retrieving the results for a completed job, The JobResults endpoint for a completed job supports pagination.

  • offset - Sets where you want to start from. Default: 0
  • limit - Determines how many rows are returned (maximum of 500). Default: 100

JobStatus Response Output

Output for the status of a job.

{
  "jobState": String [NOT_SUBMITTED, STARTING, RUNNING, COMPLETED, CANCELED, FAILED, CANCELLATION_REQUESTED, ENQUEUED]
  "queryType": String [UI_RUN, UI_PREVIEW, UI_INTERNAL_PREVIEW, UI_INTERNAL_RUN, UI_EXPORT, ODBC, JDBC, REST, ACCELERATOR_CREATE, ACCELERATOR_DROP, UNKNOWN, PREPARE_INTERNAL, ACCELERATOR_EXPLAIN, UI_INITIAL_PREVIEW]
  "startedAt": String (RFC3339 date),
  "endedAt": String (RFC3339 date),
  "rowCount": Number [optional],
  "acceleration": JobAccelerationStatus [optional],
  "errorMessage": String [optional]
}
Name Type Description
jobState String The state of the job, will be either NOT_SUBMITTED, STARTING, RUNNING, COMPLETED, CANCELED, FAILED, CANCELLATION_REQUESTED, or ENQUEUED
queryType String The type corresponding to what mechanism was used to submit this query, will be either UI_RUN, UI_PREVIEW, UI_INTERNAL_PREVIEW, UI_INTERNAL_RUN, UI_EXPORT, ODBC, JDBC, REST, ACCELERATOR_CREATE, ACCELERATOR_DROP, UNKNOWN, PREPARE_INTERNAL, ACCELERATOR_EXPLAIN, or UI_INITIAL_PREVIEW.
startedAt String RFC3339 date (example: 2017-10-27T21:08:22.858Z) representing the datetime the query was started.
endedAt String RFC3339 date (example: 2017-10-27T21:08:22.858Z) representing the datetime the query ended.
rowCount Number If the query is in COMPLETED state then the number of returned rows will be present.
acceleration JobAccelerationStatus Present if the query may have been accelerated.
errorMessage String If the query is in FAILED state will show the error that was recorded causing to the failure.

JobAccelerationStatus

When a query is run, reflections may be used to accelerate it. JobAccelerationStatus provides a list of relationships containing information about reflections that were detected as potentially applicable.

{
  "relationships": [JobAccelerationRelationship]
}

JobAccelerationRelationship

Describes the relationship a reflection had regarding the job.

{
  "reflectionId": String,
  "datasetId": String,
  "relationship": String [CONSIDERED, MATCHED, CHOSEN]
}

A reflection is CONSIDERED if the reflection is defined on a dataset that is used in the query but was determined to not cover the query (for example the reflection did not have a field that is used by the query).

A reflection is MATCHED if a reflection could have been used to accelerate the query but Dremio determined that it would not provide any benefits or another reflection was determined to be a better choice.

A CHOSEN reflection was used to accelerate the query. Note that multiple reflections can be used to accelerate queries.

JobResults Response Output

Output for the results of a successfully completed job.

{
  "rowCount": Number,
  "schema": [FieldSchema],
  "rows": [Json]
}
Name Type Description
rowCount Number The total number of rows for the job.
schema [FieldSchema] An array of FieldSchema definitions. Represents the schema of the data returned by the job.
rows [Json] The JSON representation of the requested rows.

FieldSchema

Represents the schema of a field. See Dataset for details.

Response Codes

400 - specified job is not in a completed state.
403 - user does not have permission to access the specified job.
404 - a job with the specified id could not be found.


results matching ""

    No results matching ""