Need the output of a task in Databricks job in JSON format

Sagar_0607
New Contributor
  1. Where can I see the logs in JSON format of the output produced by a task in Databricks jobs?

szymon_dybczak
Esteemed Contributor III

Hi @Sagar_0607 ,

You can use following REST API endpoint, which let's you retrieve the output and metadata of a single task run:

Get the output for a single run | Jobs API | REST API reference | Databricks on AWS

With this endpoint, when a notebook task returns a value through dbutils.notebook.exit() call, you can use this endpoint to retrieve that value.