Skip to main content

Databricks

v0.1.0

Look up data and run day-2 operations in a Databricks workspace over its REST API: run a bounded read-only SQL statement on a SQL warehouse, browse Unity Catalog down to a table's columns, read the datasets behind an AI/BI dashboard, watch job runs and fetch a failed run's error output, and start, stop, or restart the compute — warehouses, jobs, and clusters — through emisar's policy and approval path instead of the workspace UI.

25 allowed by default 2 need approval by default
Pack ID
databricks
Vendor
emisar
OS
linux
Actions
27
Required binaries. Install these on the host before relying on the pack — an action that calls a missing one fails at run time.
curl jq bash

Install

emisar pack install fetches this pack, re-validates it, and verifies its content hash against the --hash below — the exact bytes this page was rendered against, so a tampered copy is rejected — before copying it into the runner's packs dir. The command reloads a running daemon itself; no manual restart.

on the runner host
sudo emisar pack install databricks --hash sha256:1238a0fbdf048bf88b5dfe7693a427a7ca77a7b8c8210b354f081b44aa53235d

Actions 27 total

View on GitHub
  • databricks.catalogs_list script low

    GET /unity-catalog/catalogs

    List the Unity Catalog catalogs this token can see, with owner and type. The top of the catalog.schema.table hierarchy — start here when you need to find where a dataset lives.

    View source on GitHub
  • databricks.cluster_events script low

    POST /clusters/events

    List one cluster's recent lifecycle events, newest first — starts, resizes, driver health, termination causes — the timeline for diagnosing why a cluster misbehaved. A read that the API happens to serve over POST.

    View source on GitHub
  • databricks.cluster_get script low

    GET /clusters/get

    Show one cluster's state in detail — including the termination reason when it is down, which is the first thing to read when a cluster died. Follow a suspicious termination with databricks.cluster_events for the timeline.

    View source on GitHub
  • databricks.cluster_restart script high

    POST /clusters/restart

    Restart a running cluster — the fix for a wedged driver or a leaking Spark context. Everything attached dies with it: running notebooks lose their state and jobs executing on the cluster fail. The API returns before the restart completes; poll databricks.cluster_get until RUNNING again. A cluster that is not RUNNING is left untouched (the API treats that as a no-op).

    View source on GitHub
  • databricks.cluster_start script medium

    POST /clusters/start

    Start a terminated all-purpose cluster with its previous configuration. The API returns before the cluster is up — the reported state is usually PENDING; poll databricks.cluster_get until RUNNING. A cluster that is not TERMINATED is left untouched (the API treats that as a no-op), and job-launched clusters cannot be started.

    View source on GitHub
  • databricks.clusters_list script low

    GET /clusters/list

    List the workspace's all-purpose and job clusters with state, Spark version, and sizing. Filter by state to see only what is RUNNING — or what died in ERROR.

    View source on GitHub
  • databricks.dashboard_get script low

    GET /lakeview/dashboards/<id>

    Show what one AI/BI (Lakeview) dashboard is made of: its pages, and each dataset behind it with the dataset's parameter keywords. The dataset names here are what databricks.dashboard_sql takes to fetch the actual SQL, and the warehouse_id is where that SQL runs.

    View source on GitHub
  • databricks.dashboard_sql script low

    GET /lakeview/dashboards/<id> dataset SQL

    Show the SQL behind one dataset of an AI/BI (Lakeview) dashboard, with the dataset's parameters. The query may contain :parameter markers — replace each with a literal value before re-running it through databricks.sql_query on the dashboard's warehouse. Get dataset names from databricks.dashboard_get; the name and the display name both match.

    View source on GitHub
  • databricks.dashboards_list script low

    GET /lakeview/dashboards

    List the workspace's AI/BI (Lakeview) dashboards with their lifecycle state and default warehouse. Use it to find the dashboard ID that databricks.dashboard_get and databricks.dashboard_sql take — the same ID that appears in a dashboard's /dashboardsv3/<id> URL.

    View source on GitHub
  • databricks.job_get script low

    GET /jobs/get

    Show one job's definition: its schedule, task graph with each task's kind and dependencies, and the job-level parameters with their defaults — what you review before triggering databricks.job_run_now.

    View source on GitHub
  • databricks.job_run_cancel script medium

    POST /jobs/runs/cancel

    Cancel a running job run — or a single task run — and report the state it reached. Cancellation is asynchronous: the reported state is often still TERMINATING; poll databricks.job_run_get until it settles. The job itself stays defined and can be run again.

    View source on GitHub
  • databricks.job_run_get script low

    GET /jobs/runs/get

    Show one job run's state and its per-task breakdown — which task failed, each task's own run_id, and how long each took. A failed task's run_id is what databricks.job_run_output takes for the error detail.

    View source on GitHub
  • databricks.job_run_now script high

    POST /jobs/run-now

    Trigger a run of an existing job now, optionally overriding its job-level parameters. This executes whatever the job's tasks are defined to do — including writes to production tables — so review the definition with databricks.job_get first. Returns the new run's ID and state; follow it with databricks.job_run_get.

    View source on GitHub
  • databricks.job_run_output script medium

    GET /jobs/runs/get-output

    Show why one task run failed: the error, a bounded tail of its error trace and logs, and the notebook's exit value if it set one. Takes a TASK run's ID — get it from the tasks list in databricks.job_run_get, not the job run's own ID.

    View source on GitHub
  • databricks.job_runs_list script low

    GET /jobs/runs/list

    List recent job runs, newest first — the workspace-wide "what ran and what failed" view. Filter to one job with job_id, or to only active or only completed runs. Each run's result code says why it ended; dig into one run with databricks.job_run_get.

    View source on GitHub
  • databricks.jobs_list script low

    GET /jobs/list

    List the workspace's jobs (workflows) with their creator. Use the name filter to find one job by its exact, case-insensitive name; the job_id here is what the run actions take.

    View source on GitHub
  • databricks.schemas_list script low

    GET /unity-catalog/schemas

    List the schemas inside one Unity Catalog catalog. The middle level of the catalog.schema.table hierarchy, between databricks.catalogs_list and databricks.tables_list.

    View source on GitHub
  • databricks.sql_query script medium

    POST /sql/statements

    Run one read-only SQL statement on a Databricks SQL warehouse and return a bounded slice of the result: column names and types, rows as strings, and honest counts of everything clipped away. The statement must start with SELECT, VALUES, SHOW, DESCRIBE, or EXPLAIN — put a CTE inside a subquery (SELECT ... FROM (WITH ... SELECT ...) q) — and runs with exactly the grants the runner's token holds. If the warehouse is still starting when the wait elapses, the statement keeps running and the returned state is PENDING or RUNNING: poll it with databricks.sql_statement.

    View source on GitHub
  • databricks.sql_statement script medium

    GET /sql/statements/<id>

    Check a submitted SQL statement's state and fetch its result once it finished — the poll half of databricks.sql_query for statements that outlived the request's wait. Returns the same bounded result shape.

    View source on GitHub
  • databricks.sql_statement_cancel script medium

    POST /sql/statements/<id>/cancel

    Cancel a running SQL statement so it stops consuming the warehouse, then report the state the statement actually reached. Cancellation is best-effort: a statement that finished first reports its terminal state instead.

    View source on GitHub
  • databricks.table_get script low

    GET /unity-catalog/tables/<full_name>

    Show one Unity Catalog table's shape: columns with their SQL types and nullability, the table type and storage format, and — for a view — the defining SQL. What you read before writing a databricks.sql_query against an unfamiliar table.

    View source on GitHub
  • databricks.tables_list script low

    GET /unity-catalog/tables

    List the tables and views inside one Unity Catalog schema, with each one's type and storage format. Columns are deliberately omitted here — fetch one table's full shape with databricks.table_get.

    View source on GitHub
  • databricks.warehouse_get script low

    GET /sql/warehouses/<id>

    Show one SQL warehouse's state, sizing, and health detail — including the failure summary when the platform reports it degraded. The state to poll after databricks.warehouse_start or databricks.warehouse_stop.

    View source on GitHub
  • databricks.warehouse_start script medium

    POST /sql/warehouses/<id>/start

    Start a stopped SQL warehouse ahead of the queries that need it, so they skip the cold start. The API returns before the warehouse is up — the reported state is usually STARTING; poll databricks.warehouse_get until RUNNING. Starting a warehouse that is already running is a no-op.

    View source on GitHub
  • databricks.warehouse_stop script medium

    POST /sql/warehouses/<id>/stop

    Stop a running SQL warehouse to cut its compute spend. Queries running on it are interrupted, and the next statement that arrives auto-starts it again at cold-start latency. The API returns before the warehouse is down — poll databricks.warehouse_get until STOPPED.

    View source on GitHub
  • databricks.warehouses_list script low

    GET /sql/warehouses

    List the workspace's SQL warehouses with state, size, and health at a glance. The warehouse ID here is what databricks.sql_query runs on; a STOPPED warehouse auto-starts when a statement arrives, at cold-start latency.

    View source on GitHub
  • databricks.whoami script low

    GET /preview/scim/v2/Me

    Check which Databricks identity the runner's token authenticates as, and that the workspace is reachable at all. Use it first when any other action fails auth, or as the setup verification.

    View source on GitHub