SYS.PROJECT.JOBS
The sys.project.jobs
table contains the metadata for the jobs in a project. This table only includes the jobs that are being executed at the time that this system table is queried. To get the history of jobs, see sys.project.history.jobs.
SELECT *
FROM sys.project.jobs
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 | engine | error_msg | query | is_profile_incomplete |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1e011d6d-722e-7cc6-2b99-ec4c36b1d400 | RUNNING | UI_RUN | test_user@dremio.com | [sys.project.jobs] | empty text | 1 | 2022-02-05 20:48:18.187 | 2022-02-05 20:48:18.187 | 2022-02-05 20:48:18.273 | 2022-02-05 20:48:18.749 | 2022-02-05 20:48:18.803 | 1970-01-01 00:00:00.000 | 2022-02-05 20:48:18.813 | 2022-02-05 20:48:18.876 | 1970-01-01 00:00:00.000 | 1644094098187 | 1644094098187 | 1644094098273 | 1644094098749 | 1644094098803 | 0 | 1644094098813 | 1644094098876 | 0 | 3.8150000035E9 | 0 | 0 | 0 | 0 | false | First Engine | empty text | SELECT * FROM sys.project.jobs | false |
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. |
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; "" otherwise. |
query | varchar | The SQL query that was submitted. |
is_profile_incomplete | Boolean | If the job has incomplete telemetry data, true . Otherwise, false . |