Skip to main content

task_runs

Creates, updates, deletes, gets or lists a task_runs resource.

Overview

Nametask_runs
TypeResource
Iddatabricks_workspace.cleanrooms.task_runs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
notebook_namestringAsset name of the notebook executed in this task run.
output_schema_namestringName of the output schema associated with the clean rooms notebook task run.
collaborator_job_run_infoobjectJob run info of the task in the runner's local workspace. This field is only included in the LIST API. if the task was run within the same workspace the API is being called. If the task run was in a different workspace under the same metastore, only the workspace_id is included.
notebook_etagstringEtag of the notebook executed in this task run, used to identify the notebook version.
notebook_job_run_statestringState of the task run.
notebook_updated_atintegerThe timestamp of when the notebook was last updated.
output_schema_expiration_timeintegerExpiration time of the output schema of the task run (if any), in epoch milliseconds.
run_durationintegerDuration of the task run, in milliseconds.
start_timeintegerWhen the task run started, in epoch milliseconds.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectclean_room_name, deployment_namenotebook_name, page_size, page_tokenList all the historical notebook task runs in a clean room.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
clean_room_namestringName of the clean room.
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
notebook_namestringNotebook name
page_sizeintegerThe maximum number of task runs to return. Currently ignored - all runs will be returned.
page_tokenstringOpaque pagination token to go to next page based on previous query.

SELECT examples

List all the historical notebook task runs in a clean room.

SELECT
notebook_name,
output_schema_name,
collaborator_job_run_info,
notebook_etag,
notebook_job_run_state,
notebook_updated_at,
output_schema_expiration_time,
run_duration,
start_time
FROM databricks_workspace.cleanrooms.task_runs
WHERE clean_room_name = '{{ clean_room_name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND notebook_name = '{{ notebook_name }}'
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;