Skip to main content

job_run_output

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

Overview

Namejob_run_output
TypeResource
Iddatabricks_workspace.jobs.job_run_output

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
clean_rooms_notebook_outputobjectThe output of a clean rooms notebook task, if available
dashboard_outputobjectThe output of a dashboard task, if available
dbt_cloud_outputobjectDeprecated in favor of the new dbt_platform_output
dbt_outputobjectThe output of a dbt task, if available.
dbt_platform_outputobject
errorstringAn error message indicating why a task failed or why output is not available. The message is unstructured, and its exact format is subject to change.
error_tracestringIf there was an error executing the run, this field contains any available stack traces.
infostring
logsstringThe output from tasks that write to standard streams (stdout/stderr) such as spark_jar_task, spark_python_task, python_wheel_task. It's not supported for the notebook_task, pipeline_task or spark_submit_task. Databricks restricts this API to return the last 5 MB of these logs.
logs_truncatedbooleanWhether the logs are truncated.
metadataobjectRun was retrieved successfully
notebook_outputobjectThe output of a notebook task, if available. A notebook task that terminates (either successfully or with a failure) without calling `dbutils.notebook.exit()` is considered to have an empty output. This field is set but its result value is empty. Databricks restricts this API to return the first 5 MB of the output. To return a larger result, use the [ClusterLogConf] field to configure log storage for the job cluster. [ClusterLogConf]: https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterlogconf
run_job_outputobjectThe output of a run job task, if available
sql_outputobjectThe output of a SQL task, if available.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_outputselectrun_id, deployment_nameRetrieve the output and metadata of a single task run. When a notebook task returns a value through

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
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
run_idintegerThe canonical identifier for the run.

SELECT examples

Retrieve the output and metadata of a single task run. When a notebook task returns a value through

SELECT
clean_rooms_notebook_output,
dashboard_output,
dbt_cloud_output,
dbt_output,
dbt_platform_output,
error,
error_trace,
info,
logs,
logs_truncated,
metadata,
notebook_output,
run_job_output,
sql_output
FROM databricks_workspace.jobs.job_run_output
WHERE run_id = '{{ run_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;