Skip to main content
Version: 24.3.x

SYS.JOBS

The sys.jobs table contains metadata for the jobs currently running in the Dremio instance.

Syntax
SELECT * 
FROM sys.jobs

Example Output

job_idstatusquery_typeuser_namequeried_datasetsscanned_datasetsattempt_countsubmitted_tsattempt_started_tsmetadata_retrieval_tsplanning_start_tsquery_enqueued_tsengine_start_tsexecution_planning_tsexecution_start_tsfinal_state_tssubmitted_epoch_millisattempt_started_epoch_millismetadata_retrieval_epoch_millisplanning_start_epoch_millisquery_enqueued_epoch_millisengine_start_epoch_millisexecution_planning_epoch_millisexecution_start_epoch_millisfinal_state_epoch_millisplanner_estimated_costrows_scannedbytes_scannedrows_returnedbytes_returnedacceleratedqueue_nameengineerror_msgquery
1d3091b1-d0be-0169-8ace-e43f562c7000RUNNINGUI_RUNdremio[sys.jobs]empty text12022-07-14 01:15:57.7822022-07-14 01:15:57.7812022-07-14 01:15:57.7822022-07-14 01:15:57.7892022-07-14 01:15:57.8402022-07-14 01:15:57.8402022-07-14 01:15:57.8762022-07-14 01:15:57.8811970-01-01 00:00:00.0001657761357782165776135778116577613577821657761357789165776135784016577613578401657761357876165776135788103.8150000035E90000falseLow Cost User Queriesempty textempty textSELECT * FROM sys.jobs

Fields

FieldData TypeDescription
job_idvarcharThe UUID to identify the job.
statusvarcharThe state of the job.
Enum: SETUP, QUEUED, ENGINE START, RUNNING
query_typevarcharThe mechanism used to submit the job.
Enum: ACCELERATOR_CREATE, ACCELERATOR_DROP, ACCELERATOR_EXPLAIN, FLIGHT,INTERNAL_ICEBERG_METADATA_DROP, JDBC, UI_EXPORT, UI_INTERNAL_PREVIEW, UI_INTERNAL_RUN, UI_PREVIEW, UI_RUN, METADATA_REFRESH, ODBC, PREPARE_INTERNAL, REST, UNKNOWN
user_namevarcharThe username of the user who submitted the job. For jobs that are triggered by Dremio, this value is $dremio$.
queried_datasets[varchar]An array representation of the fully-qualified dataset (table and view) names referenced by the job.
scanned_datasets[varchar]An array representation of the fully-qualified table names or reflection IDs scanned during the process.
Note: The scanned datasets are often different from the queried_datasets.
attempt_countintegerThe number of attempts that the job was attempted.
submitted_tstimestampThe date and time when the job was submitted to the system.
attempt_started_tstimestampThe date and time when latest attempt of the job was started. In most cases, this will be the same value as submitted_ts.
metadata_retrieval_tstimestampThe date and time when the metadata retrieval phase of the job started.
planning_start_tstimestampThe date and time when the planning phase of the job started.
query_enqueued_tstimestampThe date and time when the job was first submitted to the engine.
engine_start_tstimestampThe date and time when the engine replica start up was triggered.
execution_planning_tstimestampThe date and time when the execution planning phase of the job started.
execution_start_tstimestampThe date and time when the job started processing on the engine replicas.
final_state_tstimestampThe date and time when the job execution reached a final state (complete, failed, or canceled).
submitted_epoch_millisintegerThe date and time (in milliseconds) when the job was submitted to the system.
attempt_started_epoch_millisintegerThe date and time (in milliseconds) when this attempt started. In most cases, this will be the same value as submitted_epoch.
metadata_retrieval_epoch_millisintegerThe date and time (in milliseconds) when the metadata retrieval phase of the job started.
planning_start_epoch_millisintegerThe date and time (in milliseconds) when the planning phase of the job started.
query_enqueued_epoch_millisintegerThe date and time (in milliseconds) when the job was first submitted to the engine.
engine_start_epoch_millisintegerThe date and time (in milliseconds) when the engine replica start up was triggered.
execution_planning_epoch_millisintegerThe date and time (in milliseconds) when the execution planning phase of the job started.
execution_start_epoch_millisintegerThe date and time (in milliseconds) when the job started processing on the engine replicas.
final_state_epoch_millisintegerThe date and time (in milliseconds) when the job execution reached a final state (complete, failed, or canceled).
planner_estimated_costdoubleThe estimated cost value provided by the planner.
rows_scannedintegerThe sum of rows that were scanned by all the scans in the job.
bytes_scannedintegerThe sum of the bytes that were scanned by all the scans in the job.
rows_returnedintegerThe number of rows returned by the job.
bytes_returnedintegerThe number of bytes returned by the job results.
acceleratedbooleanThis value will be true if the job was accelerated by a reflection; false otherwise.
queue_namevarcharThe name of the queue that the job is executing on.
enginevarcharThe name of the engine that the job is executing on.
error_msgvarcharThis value will contain the error message that resulted from the job if the job failed.
queryvarcharThe SQL query that was submitted.