Skip to content
Scalekit Docs
Talk to an EngineerDashboard

Databricks Workspace connector

Service Principal (OAuth 2.0)AnalyticsAutomationDatabases

Connect to Databricks Workspace APIs using a Service Principal with OAuth 2.0 client credentials to manage clusters, jobs, notebooks, SQL, and more.

Databricks Workspace connector

  1. Terminal window
    npm install @scalekit-sdk/node

    Full SDK reference: Node.js | Python

  2. Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>

Connect this agent connector to let your agent:

  • List workspace, secrets, repos — List the contents (notebooks, folders, libraries) of a Databricks workspace directory
  • Import workspace — Import a notebook into the Databricks workspace from base64-encoded content
  • Get workspace, permissions, sql statement result chunk — Get metadata about a Databricks workspace object (notebook, folder, or file), including its object type, language, and object ID
  • Export workspace — Export a Databricks notebook or directory
  • Delete workspace, secret, repo — Permanently delete a notebook or directory from the Databricks workspace
  • Create secret scope, repo, job — Create a new secret scope in the Databricks workspace, backed by Databricks or an Azure Key Vault

Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.

databricksworkspace_cluster_create#Create and start a new Databricks compute cluster. Specify either a fixed number of workers or an autoscaling range.7 params

Create and start a new Databricks compute cluster. Specify either a fixed number of workers or an autoscaling range.

NameTypeRequiredDescription
cluster_namestringrequiredDisplay name for the new cluster
node_type_idstringrequiredThe instance type for driver and worker nodes
spark_versionstringrequiredThe Databricks Runtime version to use for the cluster
autotermination_minutesintegeroptionalAutomatically terminate the cluster after this many minutes of inactivity. Set to 0 to disable.
max_workersintegeroptionalMaximum number of workers when autoscaling. Provide with min_workers instead of num_workers.
min_workersintegeroptionalMinimum number of workers when autoscaling. Provide with max_workers instead of num_workers.
num_workersintegeroptionalFixed number of worker nodes. Omit and use min_workers/max_workers instead to enable autoscaling.
databricksworkspace_cluster_edit#Edit the configuration of an existing Databricks cluster. The cluster must be running or terminated; this replaces its full configuration, so include every field you want to keep, not just the ones you're changing.8 params

Edit the configuration of an existing Databricks cluster. The cluster must be running or terminated; this replaces its full configuration, so include every field you want to keep, not just the ones you're changing.

NameTypeRequiredDescription
cluster_idstringrequiredThe unique identifier of the cluster to edit.
cluster_namestringrequiredDisplay name for the cluster
node_type_idstringrequiredThe instance type for driver and worker nodes
spark_versionstringrequiredThe Databricks Runtime version to use for the cluster
autotermination_minutesintegeroptionalAutomatically terminate the cluster after this many minutes of inactivity. Set to 0 to disable.
max_workersintegeroptionalMaximum number of workers when autoscaling. Provide with min_workers instead of num_workers.
min_workersintegeroptionalMinimum number of workers when autoscaling. Provide with max_workers instead of num_workers.
num_workersintegeroptionalFixed number of worker nodes. Omit and use min_workers/max_workers instead to enable autoscaling.
databricksworkspace_cluster_get#Get details of a specific Databricks cluster by cluster ID.1 param

Get details of a specific Databricks cluster by cluster ID.

NameTypeRequiredDescription
cluster_idstringrequiredThe unique identifier of the cluster.
databricksworkspace_cluster_permanent_delete#Permanently delete a Databricks cluster by cluster ID. Unlike terminating a cluster, this removes it entirely and it can no longer be started or listed. This action is irreversible.1 param

Permanently delete a Databricks cluster by cluster ID. Unlike terminating a cluster, this removes it entirely and it can no longer be started or listed. This action is irreversible.

NameTypeRequiredDescription
cluster_idstringrequiredThe unique identifier of the cluster to permanently delete.
databricksworkspace_cluster_resize#Resize a running Databricks cluster by setting a fixed worker count or an autoscaling range.4 params

Resize a running Databricks cluster by setting a fixed worker count or an autoscaling range.

NameTypeRequiredDescription
cluster_idstringrequiredThe unique identifier of the cluster to resize.
max_workersintegeroptionalMaximum number of workers when autoscaling. Provide with min_workers instead of num_workers.
min_workersintegeroptionalMinimum number of workers when autoscaling. Provide with max_workers instead of num_workers.
num_workersintegeroptionalFixed number of worker nodes. Omit and use min_workers/max_workers instead to enable autoscaling.
databricksworkspace_cluster_restart#Restart a running Databricks cluster by cluster ID. Useful for clearing cached state or applying updated init scripts.1 param

Restart a running Databricks cluster by cluster ID. Useful for clearing cached state or applying updated init scripts.

NameTypeRequiredDescription
cluster_idstringrequiredThe unique identifier of the cluster to restart.
databricksworkspace_cluster_start#Start a terminated Databricks cluster by cluster ID.1 param

Start a terminated Databricks cluster by cluster ID.

NameTypeRequiredDescription
cluster_idstringrequiredThe unique identifier of the cluster to start.
databricksworkspace_cluster_terminate#Terminate a Databricks cluster by cluster ID. The cluster will be deleted and all its associated resources released.1 param

Terminate a Databricks cluster by cluster ID. The cluster will be deleted and all its associated resources released.

NameTypeRequiredDescription
cluster_idstringrequiredThe unique identifier of the cluster to terminate.
databricksworkspace_clusters_list#List all clusters in the Databricks workspace.0 params

List all clusters in the Databricks workspace.

databricksworkspace_dbfs_delete#Permanently delete a file or directory from the Databricks File System (DBFS). This action is irreversible.2 params

Permanently delete a file or directory from the Databricks File System (DBFS). This action is irreversible.

NameTypeRequiredDescription
pathstringrequiredThe DBFS path of the file or directory to delete.
recursivebooleanoptionalWhether to recursively delete a directory and its contents
databricksworkspace_dbfs_list#List the contents of a directory on the Databricks File System (DBFS).1 param

List the contents of a directory on the Databricks File System (DBFS).

NameTypeRequiredDescription
pathstringrequiredThe DBFS path to list.
databricksworkspace_dbfs_put#Write a small file (up to 2 MB) to the Databricks File System (DBFS) in a single call, creating any needed parent directories. For larger files, use the streaming create/add-block/close APIs instead.3 params

Write a small file (up to 2 MB) to the Databricks File System (DBFS) in a single call, creating any needed parent directories. For larger files, use the streaming create/add-block/close APIs instead.

NameTypeRequiredDescription
contents_base64stringrequiredBase64-encoded file contents to write. Maximum 2 MB after encoding.
pathstringrequiredThe DBFS path to write the file to.
overwritebooleanoptionalWhether to overwrite an existing file at the destination path
databricksworkspace_dbfs_read#Read up to 1 MB of a file's contents from the Databricks File System (DBFS). The response returns the content base64-encoded. Use offset and length to page through larger files.3 params

Read up to 1 MB of a file's contents from the Databricks File System (DBFS). The response returns the content base64-encoded. Use offset and length to page through larger files.

NameTypeRequiredDescription
pathstringrequiredThe DBFS path of the file to read.
lengthintegeroptionalNumber of bytes to read, starting at offset. Maximum is 1,048,576 (1 MB).
offsetintegeroptionalByte offset to start reading from.
databricksworkspace_information_schema_columns#List columns for a table using INFORMATION_SCHEMA.COLUMNS. Returns column name, data type, nullability, numeric precision/scale, max char length, and comment.4 params

List columns for a table using INFORMATION_SCHEMA.COLUMNS. Returns column name, data type, nullability, numeric precision/scale, max char length, and comment.

NameTypeRequiredDescription
catalogstringrequiredThe catalog containing the table.
schemastringrequiredThe schema containing the table.
tablestringrequiredThe table to list columns for.
warehouse_idstringrequiredThe ID of the SQL warehouse to run the query on.
databricksworkspace_information_schema_schemata#List all schemas within a catalog using INFORMATION_SCHEMA.SCHEMATA. Used for schema discovery during setup.2 params

List all schemas within a catalog using INFORMATION_SCHEMA.SCHEMATA. Used for schema discovery during setup.

NameTypeRequiredDescription
catalogstringrequiredThe catalog to list schemas from.
warehouse_idstringrequiredThe ID of the SQL warehouse to run the query on.
databricksworkspace_information_schema_table_constraints#List PRIMARY KEY and FOREIGN KEY constraints for tables in a schema using INFORMATION_SCHEMA.TABLE_CONSTRAINTS. Used to auto-detect join keys.3 params

List PRIMARY KEY and FOREIGN KEY constraints for tables in a schema using INFORMATION_SCHEMA.TABLE_CONSTRAINTS. Used to auto-detect join keys.

NameTypeRequiredDescription
catalogstringrequiredThe catalog containing the schema.
schemastringrequiredThe schema to list constraints from.
warehouse_idstringrequiredThe ID of the SQL warehouse to run the query on.
databricksworkspace_information_schema_tables#List tables and views in a schema using INFORMATION_SCHEMA.TABLES. Returns table name, type (MANAGED, EXTERNAL, VIEW, etc.), and comment for schema discovery.3 params

List tables and views in a schema using INFORMATION_SCHEMA.TABLES. Returns table name, type (MANAGED, EXTERNAL, VIEW, etc.), and comment for schema discovery.

NameTypeRequiredDescription
catalogstringrequiredThe catalog to query INFORMATION_SCHEMA from.
schemastringrequiredThe schema to list tables from.
warehouse_idstringrequiredThe ID of the SQL warehouse to run the query on.
databricksworkspace_job_create#Create a new Databricks job definition made up of one or more tasks.6 params

Create a new Databricks job definition made up of one or more tasks.

NameTypeRequiredDescription
namestringrequiredDisplay name for the new job
tasksarrayrequiredArray of task definitions that make up the job. Each task needs a unique task_key plus one task type (notebook_task, spark_jar_task, python_wheel_task, sql_task, etc.) and either existing_cluster_id or new_cluster.
job_clustersarrayoptionalShared cluster definitions that tasks can reference by job_cluster_key instead of using existing_cluster_id or new_cluster per task
max_concurrent_runsintegeroptionalMaximum number of concurrent runs allowed for this job
tagsobjectoptionalKey-value tags attached to the job
timeout_secondsintegeroptionalTimeout applied to each run of this job
databricksworkspace_job_delete#Delete a Databricks job by job ID. Active runs are not stopped; the job is removed once its runs finish.1 param

Delete a Databricks job by job ID. Active runs are not stopped; the job is removed once its runs finish.

NameTypeRequiredDescription
job_idintegerrequiredThe unique identifier of the job to delete.
databricksworkspace_job_get#Get details of a specific Databricks job by job ID.1 param

Get details of a specific Databricks job by job ID.

NameTypeRequiredDescription
job_idintegerrequiredThe unique identifier of the job.
databricksworkspace_job_run_get#Retrieve the metadata and status of a single Databricks job run, including its state, start/end times, and task results. Complements databricksworkspace_job_runs_list, which only lists summaries.1 param

Retrieve the metadata and status of a single Databricks job run, including its state, start/end times, and task results. Complements databricksworkspace_job_runs_list, which only lists summaries.

NameTypeRequiredDescription
run_idstringrequiredThe ID of the job run to retrieve.
databricksworkspace_job_run_now#Trigger an immediate run of a Databricks job by job ID.1 param

Trigger an immediate run of a Databricks job by job ID.

NameTypeRequiredDescription
job_idintegerrequiredThe unique identifier of the job to run.
databricksworkspace_job_runs_list#List all job runs in the Databricks workspace, optionally filtered by job ID.3 params

List all job runs in the Databricks workspace, optionally filtered by job ID.

NameTypeRequiredDescription
job_idintegeroptionalFilter runs by a specific job ID. If omitted, returns runs for all jobs.
limitintegeroptionalThe number of runs to return. Defaults to 20. Maximum is 1000.
offsetintegeroptionalThe offset of the first run to return.
databricksworkspace_jobs_list#List all jobs in the Databricks workspace.2 params

List all jobs in the Databricks workspace.

NameTypeRequiredDescription
limitintegeroptionalThe number of jobs to return. Defaults to 20. Maximum is 100.
offsetintegeroptionalThe offset of the first job to return.
databricksworkspace_permissions_get#Retrieve the access control list (permissions) for a Databricks object such as a cluster, job, notebook, or SQL warehouse.2 params

Retrieve the access control list (permissions) for a Databricks object such as a cluster, job, notebook, or SQL warehouse.

NameTypeRequiredDescription
request_object_idstringrequiredThe ID of the object to retrieve permissions for.
request_object_typestringrequiredThe type of object to retrieve permissions for
databricksworkspace_permissions_update#Update the access control list (permissions) for a Databricks object such as a cluster, job, notebook, or SQL warehouse. Existing grants not included in the access control list are preserved unless explicitly overridden.3 params

Update the access control list (permissions) for a Databricks object such as a cluster, job, notebook, or SQL warehouse. Existing grants not included in the access control list are preserved unless explicitly overridden.

NameTypeRequiredDescription
access_control_listarrayrequiredJSON array of access control entries to apply. Each entry has one grantee key (user_name, group_name, or service_principal_name) and a permission_level.
request_object_idstringrequiredThe ID of the object to update permissions for.
request_object_typestringrequiredThe type of object to update permissions for
databricksworkspace_repo_create#Clone a Git repository into the Databricks workspace.3 params

Clone a Git repository into the Databricks workspace.

NameTypeRequiredDescription
providerstringrequiredThe Git provider hosting the repository
urlstringrequiredThe HTTPS clone URL of the Git repository
pathstringoptionalDesired workspace path for the cloned repo. If omitted, Databricks places it under /Repos/{user}/{repo name}.
databricksworkspace_repo_delete#Permanently remove a Git repo from the Databricks workspace. This unlinks the repo and deletes its workspace files; it does not affect the remote Git repository. This action is irreversible.1 param

Permanently remove a Git repo from the Databricks workspace. This unlinks the repo and deletes its workspace files; it does not affect the remote Git repository. This action is irreversible.

NameTypeRequiredDescription
repo_idstringrequiredThe ID of the repo to delete.
databricksworkspace_repo_update#Check out a different branch or tag in a Databricks repo, or pull the latest changes for the currently checked-out branch.3 params

Check out a different branch or tag in a Databricks repo, or pull the latest changes for the currently checked-out branch.

NameTypeRequiredDescription
repo_idstringrequiredThe ID of the repo to update.
branchstringoptionalName of the branch to check out. Provide either branch or tag, not both.
tagstringoptionalName of the tag to check out. Provide either branch or tag, not both.
databricksworkspace_repos_list#List Git repositories linked into the Databricks workspace, optionally filtered by path prefix.2 params

List Git repositories linked into the Databricks workspace, optionally filtered by path prefix.

NameTypeRequiredDescription
next_page_tokenstringoptionalToken for the next page of results
path_prefixstringoptionalFilter repos to only those whose workspace path starts with this prefix
databricksworkspace_scim_me_get#Retrieve information about the currently authenticated service principal in the Databricks workspace.0 params

Retrieve information about the currently authenticated service principal in the Databricks workspace.

databricksworkspace_scim_users_list#List all users in the Databricks workspace using the SCIM v2 API.3 params

List all users in the Databricks workspace using the SCIM v2 API.

NameTypeRequiredDescription
countintegeroptionalMaximum number of results to return per page.
filterstringoptionalSCIM filter expression to narrow results (e.g. userName eq "user@example.com").
startIndexintegeroptional1-based index of the first result to return. Used for pagination.
databricksworkspace_secret_delete#Delete a secret key from a Databricks secret scope. This action is irreversible.2 params

Delete a secret key from a Databricks secret scope. This action is irreversible.

NameTypeRequiredDescription
keystringrequiredThe key name of the secret to delete.
scopestringrequiredThe name of the secret scope containing the key.
databricksworkspace_secret_put#Create or overwrite a secret in a Databricks secret scope. Provide exactly one of string_value or bytes_value (base64-encoded).4 params

Create or overwrite a secret in a Databricks secret scope. Provide exactly one of string_value or bytes_value (base64-encoded).

NameTypeRequiredDescription
keystringrequiredThe key name under which to store the secret.
scopestringrequiredThe name of the secret scope to write the secret into.
bytes_valuestringoptionalBase64-encoded bytes value to store. Use instead of string_value.
string_valuestringoptionalThe UTF-8 string value to store. Use instead of bytes_value.
databricksworkspace_secret_scope_create#Create a new secret scope in the Databricks workspace, backed by Databricks or an Azure Key Vault.4 params

Create a new secret scope in the Databricks workspace, backed by Databricks or an Azure Key Vault.

NameTypeRequiredDescription
scopestringrequiredName of the new secret scope.
backend_azure_keyvaultobjectoptionalAzure Key Vault connection details. Required when scope_backend_type is AZURE_KEYVAULT.
initial_manage_principalstringoptionalThe initial principal granted MANAGE permission on this scope. Only 'users' is supported for Databricks-backed scopes.
scope_backend_typestringoptionalThe backend used to store the scope's secrets
databricksworkspace_secrets_list#List the secret keys stored within a Databricks secret scope. Only key names and metadata are returned, never secret values.1 param

List the secret keys stored within a Databricks secret scope. Only key names and metadata are returned, never secret values.

NameTypeRequiredDescription
scopestringrequiredThe name of the secret scope to list keys from.
databricksworkspace_secrets_scopes_list#List all secret scopes available in the Databricks workspace.0 params

List all secret scopes available in the Databricks workspace.

databricksworkspace_sql_statement_cancel#Cancel a running SQL statement by its statement ID.1 param

Cancel a running SQL statement by its statement ID.

NameTypeRequiredDescription
statement_idstringrequiredThe ID of the SQL statement to cancel.
databricksworkspace_sql_statement_execute#Execute a SQL statement on a Databricks SQL warehouse and return the results.4 params

Execute a SQL statement on a Databricks SQL warehouse and return the results.

NameTypeRequiredDescription
statementstringrequiredThe SQL statement to execute.
warehouse_idstringrequiredThe ID of the SQL warehouse to execute the statement on.
catalogstringoptionalThe catalog to use for the statement execution.
schemastringoptionalThe schema to use for the statement execution.
databricksworkspace_sql_statement_get#Get the status and results of a previously executed SQL statement by its statement ID.1 param

Get the status and results of a previously executed SQL statement by its statement ID.

NameTypeRequiredDescription
statement_idstringrequiredThe ID of the SQL statement to retrieve.
databricksworkspace_sql_statement_result_chunk_get#Fetch a specific result chunk for a paginated SQL statement result. Use when a statement result has multiple chunks (large result sets).2 params

Fetch a specific result chunk for a paginated SQL statement result. Use when a statement result has multiple chunks (large result sets).

NameTypeRequiredDescription
chunk_indexintegerrequiredThe index of the result chunk to fetch (0-based).
statement_idstringrequiredThe ID of the SQL statement.
databricksworkspace_sql_warehouse_get#Get details of a specific Databricks SQL warehouse by its ID.1 param

Get details of a specific Databricks SQL warehouse by its ID.

NameTypeRequiredDescription
warehouse_idstringrequiredThe ID of the SQL warehouse to retrieve.
databricksworkspace_sql_warehouse_start#Start a stopped Databricks SQL warehouse by its ID.1 param

Start a stopped Databricks SQL warehouse by its ID.

NameTypeRequiredDescription
warehouse_idstringrequiredThe ID of the SQL warehouse to start.
databricksworkspace_sql_warehouse_stop#Stop a running Databricks SQL warehouse by its ID.1 param

Stop a running Databricks SQL warehouse by its ID.

NameTypeRequiredDescription
warehouse_idstringrequiredThe ID of the SQL warehouse to stop.
databricksworkspace_sql_warehouses_list#List all SQL warehouses available in the Databricks workspace.0 params

List all SQL warehouses available in the Databricks workspace.

databricksworkspace_unity_catalog_catalogs_list#List all Unity Catalogs accessible to the service principal in the Databricks workspace.0 params

List all Unity Catalogs accessible to the service principal in the Databricks workspace.

databricksworkspace_unity_catalog_schemas_list#List all schemas within a Unity Catalog in the Databricks workspace.1 param

List all schemas within a Unity Catalog in the Databricks workspace.

NameTypeRequiredDescription
catalog_namestringrequiredThe name of the catalog to list schemas from.
databricksworkspace_unity_catalog_tables_list#List all tables and views within a schema in a Unity Catalog in the Databricks workspace.2 params

List all tables and views within a schema in a Unity Catalog in the Databricks workspace.

NameTypeRequiredDescription
catalog_namestringrequiredThe name of the catalog containing the schema.
schema_namestringrequiredThe name of the schema to list tables from.
databricksworkspace_workspace_delete#Permanently delete a notebook or directory from the Databricks workspace. This action is irreversible.2 params

Permanently delete a notebook or directory from the Databricks workspace. This action is irreversible.

NameTypeRequiredDescription
pathstringrequiredThe absolute workspace path of the object to delete.
recursivebooleanoptionalWhether to recursively delete a directory and its contents
databricksworkspace_workspace_export#Export a Databricks notebook or directory. Directories can only be exported as DBC archives. The response contains the content base64-encoded.2 params

Export a Databricks notebook or directory. Directories can only be exported as DBC archives. The response contains the content base64-encoded.

NameTypeRequiredDescription
pathstringrequiredThe absolute workspace path of the notebook or directory to export.
formatstringoptionalExport format for the object
databricksworkspace_workspace_get_status#Get metadata about a Databricks workspace object (notebook, folder, or file), including its object type, language, and object ID.1 param

Get metadata about a Databricks workspace object (notebook, folder, or file), including its object type, language, and object ID.

NameTypeRequiredDescription
pathstringrequiredThe absolute workspace path of the object.
databricksworkspace_workspace_import#Import a notebook into the Databricks workspace from base64-encoded content. Can also be used to create a notebook from source text.5 params

Import a notebook into the Databricks workspace from base64-encoded content. Can also be used to create a notebook from source text.

NameTypeRequiredDescription
content_base64stringrequiredBase64-encoded content of the notebook to import.
pathstringrequiredThe absolute workspace path to import the notebook to.
formatstringoptionalFormat of the content being imported
languagestringoptionalProgramming language of the notebook, required when format is SOURCE
overwritebooleanoptionalWhether to overwrite an existing object at the destination path
databricksworkspace_workspace_list#List the contents (notebooks, folders, libraries) of a Databricks workspace directory.1 param

List the contents (notebooks, folders, libraries) of a Databricks workspace directory.

NameTypeRequiredDescription
pathstringrequiredThe absolute workspace path to list.