job_runs
Operations on a job_runs
resource.
Overview
Name | job_runs |
Type | Resource |
Id | databricks_workspace.workflows.job_runs |
Fields
Name | Datatype |
---|---|
description | string |
attempt_number | integer |
cleanup_duration | integer |
cluster_instance | object |
cluster_spec | object |
creator_user_name | string |
end_time | integer |
execution_duration | integer |
git_source | object |
has_more | boolean |
job_clusters | array |
job_id | integer |
job_parameters | array |
job_run_id | integer |
number_in_job | integer |
original_attempt_run_id | integer |
overriding_parameters | object |
queue_duration | integer |
repair_history | array |
run_duration | integer |
run_id | integer |
run_name | string |
run_page_url | string |
run_type | string |
schedule | object |
setup_duration | integer |
start_time | integer |
state | object |
status | object |
tasks | array |
trigger | string |
trigger_info | object |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
getrun | SELECT | run_id, deployment_name | Retrieves the metadata of a run. |
listruns | SELECT | deployment_name | List runs in descending order by start time. |
deleterun | DELETE | deployment_name | Deletes a non-active run. Returns an error if the run is active. |
cancelallruns | EXEC | deployment_name | Cancels all active runs of a job. The runs are canceled asynchronously, so it doesn't prevent new runs from being started. |
cancelrun | EXEC | deployment_name | Cancels a job run or a task run. The run is canceled asynchronously, so it may still be running when this request completes. |
exportrun | EXEC | run_id, deployment_name | Export and retrieve the job run task. |
repairrun | EXEC | deployment_name | Re-run one or more tasks. Tasks are re-run as part of the original job run. They use the current job and task settings, and can be viewed in the history for the original job run. |
SELECT
examples
- job_runs (listruns)
- job_runs (getrun)
SELECT
description,
attempt_number,
cleanup_duration,
cluster_instance,
cluster_spec,
creator_user_name,
end_time,
execution_duration,
git_source,
has_more,
job_clusters,
job_id,
job_parameters,
job_run_id,
number_in_job,
original_attempt_run_id,
overriding_parameters,
queue_duration,
repair_history,
run_duration,
run_id,
run_name,
run_page_url,
run_type,
schedule,
setup_duration,
start_time,
state,
status,
tasks,
trigger,
trigger_info
FROM databricks_workspace.workflows.job_runs
WHERE deployment_name = '{{ deployment_name }}';
SELECT
description,
attempt_number,
cleanup_duration,
cluster_instance,
cluster_spec,
creator_user_name,
end_time,
execution_duration,
git_source,
has_more,
job_clusters,
job_id,
job_parameters,
job_run_id,
number_in_job,
original_attempt_run_id,
overriding_parameters,
queue_duration,
repair_history,
run_duration,
run_id,
run_name,
run_page_url,
run_type,
schedule,
setup_duration,
start_time,
state,
status,
tasks,
trigger,
trigger_info
FROM databricks_workspace.workflows.job_runs
WHERE run_id = '{{ run_id }}' AND
deployment_name = '{{ deployment_name }}';
DELETE
example
Deletes a job_runs
resource.
/*+ delete */
DELETE FROM databricks_workspace.workflows.job_runs
WHERE deployment_name = '{{ deployment_name }}';