SYS.JOBS_RECENT
The sys.jobs_recent table contains metadata for the jobs that ran in the Dremio instance during the previous number of days specified by the support key jobs.max.age_in_days
.
SELECT *
FROM sys.jobs_recent
Example Output
job_id | status | query_type | user_name | queried_datasets | scanned_datasets | attempt_count | submitted_ts | attempt_started_ts | metadata_retrieval_ts | planning_start_ts | query_enqueued_ts | engine_start_ts | execution_planning_ts | execution_start_ts | final_state_ts | submitted_epoch_millis | attempt_started_epoch_millis | metadata_retrieval_epoch_millis | planning_start_epoch_millis | query_enqueued_epoch_millis | engine_start_epoch_millis | execution_planning_epoch_millis | execution_start_epoch_millis | final_state_epoch_millis | planner_estimated_cost | rows_scanned | bytes_scanned | rows_returned | bytes_returned | accelerated | queue_name | engine | error_msg | query |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1d3091b1-d0be-0169-8ace-e43f562c7000 | RUNNING | UI_RUN | dremio | [Samples.samples.dremio.com. | [NYC-taxi-trips-iceberg] | 1 | 2024-01-08 18:17:10 | 2024-01-08 18:17:10 | 2024-01-08 18:17:10 | 2024-01-08 18:17:10 | 2024-01-08 18:17:10 | 2024-01-08 18:17:10 | 2024-01-08 18:17:10 | 2024-01-08 18:17:10 | 2024-01-08 18:17:13 | 1704737829726 | 1704737829726 | 1704737829727 | 1704737829741 | 1704737829774 | 1704737829774 | 1704737829780 | 1704737829818 | 1704737833393 | 1.1062203440876206E12 | 71424 | 3481920 | 60000 | 2925000 | FALSE | Low Cost User Queries | empty text | empty text | SELECT * FROM "NYC-taxi-trips-iceberg" |
Fields
Field | Data Type | Description |
---|---|---|
job_id | varchar | The UUID to identify the job. |
status | varchar | The state of the job. Enum: SETUP, QUEUED, ENGINE START, RUNNING |
query_type | varchar | The 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_name | varchar | The 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_count | integer | The number of attempts that the job was attempted. |
submitted_ts | timestamp | The date and time when the job was submitted to the system. |
attempt_started_ts | timestamp | The 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_ts | timestamp | The date and time when the metadata retrieval phase of the job started. |
planning_start_ts | timestamp | The date and time when the planning phase of the job started. |
query_enqueued_ts | timestamp | The date and time when the job was first submitted to the engine. |
engine_start_ts | timestamp | The date and time when the engine replica start up was triggered. |
execution_planning_ts | timestamp | The date and time when the execution planning phase of the job started. |
execution_start_ts | timestamp | The date and time when the job started processing on the engine replicas. |
final_state_ts | timestamp | The date and time when the job execution reached a final state (complete, failed, or canceled). |
submitted_epoch_millis | integer | The date and time (in milliseconds) when the job was submitted to the system. |
attempt_started_epoch_millis | integer | The date and time (in milliseconds) when this attempt started. In most cases, this will be the same value as submitted_epoch . |
metadata_retrieval_epoch_millis | integer | The date and time (in milliseconds) when the metadata retrieval phase of the job started. |
planning_start_epoch_millis | integer | The date and time (in milliseconds) when the planning phase of the job started. |
query_enqueued_epoch_millis | integer | The date and time (in milliseconds) when the job was first submitted to the engine. |
engine_start_epoch_millis | integer | The date and time (in milliseconds) when the engine replica start up was triggered. |
execution_planning_epoch_millis | integer | The date and time (in milliseconds) when the execution planning phase of the job started. |
execution_start_epoch_millis | integer | The date and time (in milliseconds) when the job started processing on the engine replicas. |
final_state_epoch_millis | integer | The date and time (in milliseconds) when the job execution reached a final state (complete, failed, or canceled). |
planner_estimated_cost | double | The estimated cost value provided by the planner. |
rows_scanned | integer | The sum of rows that were scanned by all the scans in the job. |
bytes_scanned | integer | The sum of the bytes that were scanned by all the scans in the job. |
rows_returned | integer | The number of rows returned by the job. |
bytes_returned | integer | The number of bytes returned by the job results. |
accelerated | boolean | This value will be true if the job was accelerated by a reflection; false otherwise. |
queue_name | varchar | The name of the queue that the job is executing on. |
engine | varchar | The name of the engine that the job is executing on. |
error_msg | varchar | This value will contain the error message that resulted from the job if the job failed. |
query | varchar | The SQL query that was submitted. |