Skip to main content
  1. Posts/

Databricks Cli Usage

·141 words·1 min·
Table of Contents

We can use the Databricks cli to interact with Databricks workspaces programmatically on the command line. In this post, I want to share simple usage about Databricks cli.

Install and setup
#

On macOS, we can install databricks cli via Homebrew:

brew tap databricks/tap
brew install databricks

Personal access token:

User setting --> Developer --> Access tokens, there, you can generate a new token for connection in the cli.

Connect to databricks:

databricks configure

Paste the databricks workspace URL: https://adb-<workspace-id>.azuredatabricks.net/ and the personal access token.

multiple profiles
#

To add a second profile, just edit ~/.databrickscfg, and add a new section:

[new_profile_name]
host = xxxxx
token = xxxxx
profile = profile_name

Show a list of configured profiles:

databricks auth profiles

Show info about a profile:

databricks auth env --profile <profile_name>

references
#

Related

File Systems in Databricks
·304 words·2 mins
How to Download Files from Google Cloud Storage in the Databricks Workspace Notebook
··551 words·3 mins
Working with Databricks Workspace Files
··568 words·3 mins