Databricks CLI commands

Note

Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.

This article provides information about available Databricks CLI commands. This information supplements the command line help. For more information about installing and using the Databricks CLI, see Install or update the Databricks CLI and Databricks CLI.

The Databricks CLI includes the command groups listed in the following tables. Command groups contain sets of related commands, which can also contain subcommands. To output usage and syntax information for a command group, an individual command, or subcommand:

  • databricks <command-group> -h
  • databricks <command-group> <command-name> -h
  • databricks <command-group> <command-name> <subcommand-name> -h

Many CLI commands map to operations that are documented in the Azure Databricks REST API reference.

Workspace commands

Group Description and commands
fs Commands for managing files and the file system:
cat, cp, ls, mkdir, rm
git-credentials Commands for registering personal access tokens for Databricks to do operations on behalf of the user:
create, delete, get, list, update
repos Commands for allowing users to manage their git repos:
create, delete, get, list, update
get-permission-levels, get-permissions, set-permissions, update-permissions
secrets Commands for managing secrets, secret scopes, and access permissions:
create-scope, delete-acl, delete-scope, delete-secret, get-acl, get-secret, list-acls, list-scopes, list-secrets, put-acl, put-secret
workspace Commands to list, import, export, and delete notebooks and folders in the workspace:
delete, export, export-dir, get-status, import, import-dir, list, mkdirs
get-permission-levels, get-permissions, set-permissions, update-permissions

Compute commands

Group Description and commands
cluster-policies Commands to control users' ability to configure clusters based on a set of rules:
create, delete, edit, get, list
get-permission-levels, get-permissions, set-permissions, update-permissions
clusters Commands that allow you to create, start, edit, list, terminate, and delete clusters:
change-owner, create, delete, edit, events, get, list, list-node-types, list-zones, permanent-delete,pin, resize, restart, spark-versions, start, unpin
get-permission-levels, get-permissions, set-permissions, update-permissions
environments Commands to manage environment resources, including workspace-level base environments that define the environment version and dependencies for serverless notebooks and jobs:
create-workspace-base-environment, delete-workspace-base-environment, get-default-workspace-base-environment, get-operation, get-workspace-base-environment, list-workspace-base-environments, refresh-workspace-base-environment, update-default-workspace-base-environment, update-workspace-base-environment
global-init-scripts Commands that enable workspace administrators to configure global initialization scripts for their workspace:
create, delete, get, list, update
instance-pools Commands to create, edit, delete, and list instance pools using ready-to-use cloud instances which reduces a cluster start and auto-scaling times:
create, delete, edit, get, list
get-permission-levels, get-permissions, set-permissions, update-permissions
instance-profiles Commands to allow admins to add, list, and remove instance profiles that users can launch clusters with:
add, edit, list, remove
libraries Commands to install, uninstall, and get the status of libraries on a cluster:
all-cluster-statuses, cluster-status, install, uninstall
policy-compliance-for-clusters Commands to view and manage the policy compliance status of clusters in your workspace:
cancel-pending-cluster-enforcement, enforce-compliance, get-compliance, list-compliance
policy-families Commands to view available policy families:
get, list

Jobs commands

Group Description and commands
jobs Commands to manage jobs:
cancel-all-runs, cancel-run, create, delete, delete-run, export-run, get, get-run, get-run-output, list, list-runs, repair-run, reset, run-now, submit, update
get-permission-levels, get-permissions, set-permissions, update-permissions
policy-compliance-for-jobs Commands to view and manage the policy compliance status of jobs in your workspace:
enforce-compliance, get-compliance, list-compliance

Pipelines commands

Group Description and commands
pipelines Commands to modify and manage Lakeflow pipelines:
clone, create, delete, get, get-update, list-pipeline-events, list-pipelines, list-updates, start-update, stop, update
get-permission-levels, get-permissions, set-permissions, update-permissions
apply-environment, deploy, destroy, dry-run, generate, history, init, logs, open, run, stop

Machine learning commands

Group Description and commands
experiments Commands for interacting with experiments, which are the primary unit of organization in MLflow; all MLflow runs belong to an experiment:
create-experiment, create-logged-model, create-run, delete-experiment, delete-logged-model, delete-logged-model-tag, delete-run, delete-runs, delete-tag, finalize-logged-model, get-by-name, get-experiment, get-history, get-logged-model, get-run, list-artifacts, list-experiments, log-batch, log-inputs, log-logged-model-params, log-metric, log-model, log-outputs, log-param, restore-experiment, restore-run, restore-runs, search-experiments, search-logged-models, search-runs, set-experiment-tag, set-logged-model-tags, set-tag, update-experiment, update-run
get-permission-levels, get-permissions, set-permissions, update-permissions
feature-engineering Commands for interacting with features in the Databricks Feature Store, which provides a central registry for features used in your AI and ML models.
create-feature, create-kafka-config, create-materialized-feature, create-stream, delete-feature, delete-kafka-config, delete-materialized-feature, delete-stream, get-feature, get-kafka-config, get-materialized-feature, get-stream, list-features, list-kafka-configs, list-materialized-features, list-streams, update-feature, update-kafka-config, update-materialized-feature, update-stream
model-registry Commands for the Workspace Model Registry:
approve-transition-request, create-comment, create-model, create-model-version, create-transition-request, create-webhook, delete-comment, delete-model, delete-model-tag, delete-model-version, delete-model-version-tag, delete-transition-request, delete-webhook, get-latest-versions, get-model, get-model-version,get-model-version-download-uri, list-models, list-transition-requests, list-webhooks, reject-transition-request, rename-model, search-model-versions, search-models, set-model-tag, set-model-version-tag, test-registry-webhook, transition-stage, update-comment, update-model, update-model-version, update-webhook
get-permission-levels, get-permissions, set-permissions, update-permissions

Real-time serving commands

Group Description and commands
serving-endpoints Commands to create, update, and delete model serving endpoints:
build-logs, create, create-provisioned-throughput-endpoint, delete, export-metrics, get, get-open-api, list, logs, patch, put, put-ai-gateway, query, update-config, update-notifications, update-provisioned-throughput-endpoint-config
get-permission-levels, get-permissions, set-permissions, update-permissions

Identity and access commands

Group Description and commands
account Commands for managing Databricks accounts:
  • Identity and access: access-control, groups, groups-v2, iam-v2, service-principals, service-principals-v2, users, users-v2, workspace-assignment
  • Unity Catalog: metastore-assignments, metastores, storage-credentials
  • Settings: endpoints, ip-access-lists, network-connectivity, network-policies, settings, settings-v2, workspace-network-configuration
  • Provisioning: credentials, encryption-keys, networks, private-access, storage, vpc-endpoints, workspaces
  • Billing: billable-usage, budget-policy, budgets, log-delivery, usage-dashboards
  • OAuth: custom-app-integration, federation-policy, o-auth-published-apps, published-app-integration, service-principal-federation-policy, service-principal-secrets
  • Disaster recovery: disaster-recovery
auth Commands for authentication:
describe, login, logout, profiles, switch, token
current-user Commands to retrieve information about currently authenticated user or service principal:
me
groups Commands for groups that simplify identity management, making it easier to assign access to Databricks workspace, data, and other securable objects:
create, delete, get, list, patch, update
groups-v2 Commands for managing groups in the Databricks workspace using the updated API. Groups simplify identity management, making it easier to assign access to Databricks workspace, data, and other securable objects:
create, delete, get, list, patch, update
permissions Commands to create read, write, edit, update and manage access for various users on different objects and endpoints:
get, set, update
get-permission-levels
service-principal-secrets-proxy Commands for managing service principal secrets at the workspace level. Use the generated secrets to obtain OAuth access tokens for a service principal:
create, delete, list
service-principals Commands for identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD platforms:
create, delete, get, list, patch, update
service-principals-v2 Commands for managing service principal identities using the updated API, for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD platforms:
create, delete, get, list, patch, update
users Commands for user identities recognized by Databricks and represented by email addresses:
create, delete, get, list, patch, update
get-permission-levels, get-permissions, set-permissions, update-permissions
users-v2 Commands for managing user identities in the Databricks workspace using the updated API:
create, delete, get, list, patch, update
get-permission-levels, get-permissions, set-permissions, update-permissions
workspace-iam-v2 Commands to manage identities and workspace access:
get-workspace-access-detail-local, resolve-group-proxy, resolve-service-principal-proxy, resolve-user-proxy
Group Description and commands
alerts Commands to perform operations on alerts:
create, delete, get, list, update
alerts-legacy Deprecated. Commands to perform operations on legacy alerts:
create, delete, get, list, update
alerts-v2 Commands to manage SQL alerts using the updated API. An alert periodically runs a query, evaluates a condition of its result, and notifies users and/or notification destinations if the condition is met:
create-alert, get-alert, list-alerts, trash-alert, update-alert
data-sources Deprecated. Commands for making new query objects:
list
queries Commands to perform operations on query definitions:
create, delete, get, list, restore, update
queries-legacy Deprecated. Commands to perform operations on legacy query definitions:
create, delete, get, list, restore, update
query-history Commands to access the history of queries through SQL warehouses:
list
warehouses Commands to manage SQL warehouses, which are a compute resource that lets you run SQL commands on data objects within Databricks SQL:
create, create-default-warehouse-override, delete, delete-default-warehouse-override, edit, get, get-default-warehouse-override, get-workspace-warehouse-config, list, list-default-warehouse-overrides, set-workspace-warehouse-config, start, stop, update-default-warehouse-override
get-permission-levels, get-permissions, set-permissions, update-permissions

Unity Catalog commands

Group Description and commands
artifact-allowlists Commands to manage artifact allow lists. In Databricks Runtime 13.3 and above, you can add libraries and init scripts to the allowlist in UC so that users can leverage these artifacts on compute configured with standard access mode:
get, update
catalogs Commands to manage catalogs, the first layer of Unity Catalog's three-level namespace:
create, delete, get, list, update
connections Commands to create a connection to an external data source: