Databricks

App · Databases · 7 actions

List and run jobs, inspect runs, and view SQL warehouses in your Databricks workspace.

Actions

ActionWhat it does
Find jobLook up a single Databricks job and its full definition by ID.
Find runLook up a single job run and its current state by run ID.
Find SQL warehouseLook up a single SQL warehouse's configuration and state by ID.
List jobsList the jobs defined in your Databricks workspace.
List runsList job runs in your workspace.
List SQL warehousesList all SQL warehouses in the workspace.
Run jobTrigger a single run of an existing Databricks job right away.

Find job

Look up a single Databricks job and its full definition by ID.

Inputs

Jobjob_idnumberRequired
Pick a job, or enter its numeric ID.

Outputs

created_timenumber
When the job was created (epoch ms)
job_idnumber
The job's ID
settingsobject
The job's settings
Example output
{
  "created_time": 1700000000000,
  "creator_user_name": "user@example.com",
  "job_id": 12345,
  "settings": {
    "name": "Nightly ETL",
    "tasks": [
      {
        "task_key": "ingest"
      }
    ]
  }
}

Find run

Look up a single job run and its current state by run ID.

Inputs

Runrun_idnumberRequired
Pick a recent run, or enter its numeric ID.

Outputs

job_idnumber
The ID of the job this run belongs to
run_idnumber
The run's ID
stateobject
Life-cycle and result state of the run
Example output
{
  "job_id": 12345,
  "run_id": 67890,
  "run_name": "Nightly ETL",
  "run_page_url": "https://dbc-1234.cloud.databricks.com/#job/12345/run/1",
  "state": {
    "life_cycle_state": "TERMINATED",
    "result_state": "SUCCESS"
  }
}

Find SQL warehouse

Look up a single SQL warehouse's configuration and state by ID.

Inputs

SQL warehousewarehouse_idtextRequired
Pick a SQL warehouse, or enter its ID.

Outputs

idtext
The SQL warehouse's ID
nametext
The SQL warehouse's name
statetext
Current state (e.g. RUNNING, STOPPED)
Example output
{
  "cluster_size": "Small",
  "creator_name": "user@example.com",
  "id": "0123456789abcdef",
  "name": "Serverless Starter Warehouse",
  "num_clusters": 1,
  "state": "RUNNING"
}

List jobs

List the jobs defined in your Databricks workspace. Results come back a page at a time when there are many.

Inputs

Limitlimitnumber
Maximum number of results to return in one page (up to 100).From 1 to 100.
Next page tokenpage_tokentext
To get the next page of results, paste the next page token from a previous run's results. Leave blank to start from the first page.
Namenametext
Only return jobs whose name matches this value exactly.

Outputs

has_moretrue/false
Whether more results are available
jobslist
List of jobs
jobs_countnumber
Number of jobs returned on this page
next_page_tokentext
Token for fetching the next page
Example output
{
  "has_more": false,
  "jobs": [
    {
      "created_time": 1700000000000,
      "job_id": 12345,
      "settings": {
        "name": "Nightly ETL"
      }
    }
  ],
  "jobs_count": 1,
  "next_page_token": null
}

List runs

List job runs in your workspace. Optionally narrow to a single job or to only active or only completed runs.

Inputs

Jobjob_idnumber
Pick a job to filter by, or leave blank for all jobs.
Active onlyactive_onlytrue/false
Only return runs that are currently active (in progress).
Completed onlycompleted_onlytrue/false
Only return runs that have already finished.
Limitlimitnumber
Maximum number of runs to return in one page (up to 25).From 1 to 25.
Next page tokenpage_tokentext
To get the next page of results, paste the next page token from a previous run's results. Leave blank to start from the first page.

Outputs

has_moretrue/false
Whether more results are available
next_page_tokentext
Token for fetching the next page
runslist
List of runs
runs_countnumber
Number of runs returned on this page
Example output
{
  "has_more": false,
  "next_page_token": null,
  "runs": [
    {
      "job_id": 12345,
      "run_id": 67890,
      "run_name": "Nightly ETL",
      "state": {
        "life_cycle_state": "TERMINATED",
        "result_state": "SUCCESS"
      }
    }
  ],
  "runs_count": 1
}

List SQL warehouses

List all SQL warehouses in the workspace. SQL warehouses are a separate compute type from clusters.

Inputs

None.

Outputs

warehouseslist
List of SQL warehouses
warehouses_countnumber
Number of SQL warehouses returned
Example output
{
  "warehouses": [
    {
      "cluster_size": "Small",
      "id": "0123456789abcdef",
      "name": "Serverless Starter Warehouse",
      "state": "RUNNING"
    }
  ],
  "warehouses_count": 1
}

Run job

Trigger a single run of an existing Databricks job right away.

Inputs

Jobjob_idnumberRequired
Pick a job, or enter its numeric ID.
Notebook parametersnotebook_paramsobject
Optional values to pass to the job's notebook when it runs, entered as names and values.

Outputs

number_in_jobnumber
The run number within the job
run_idnumber
The ID of the triggered run
Example output
{
  "number_in_job": 1,
  "run_id": 67890
}

On this page