Setup UCX (Databricks CLI) from Databricks web terminal

DouglasMoore
Databricks Employee
Databricks Employee

Setup UCX from Databricks web terminal

For cases when your desktop or laptop will not support the databricks labs install ucx technical requirements such as Python 3.10, administrative access, python package access or network access but your Databricks cluster will have the Internet access requirements same as described in the main README.md document.

  • Start an Assigned (single user) interactive cluster
  • Open the web terminal (Cluster -> Apps -> Web Terminal), expand to full page for better readability

Install and setup needed UCX dependencies:

apt-get update
apt install -y python3.10-venv
unset DATABRICKS_RUNTIME_VERSION

Download and install Databricks cli (not needed for DBR 15.1 and above):

curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh

Set PATH variable to point to new install (not needed for DBR 15.1 and above):

export PATH=/usr/local/bin:$PATH

Verify Databricks cli (Should be greater than 0.219.0):

which databricks
databricks --version

Configure Databricks cli to authenticate to correct workspace, add host name, PAT token (not needed for DBR 15.1 and above):

export DATABRICKS_HOST=https://<hostname>
export DATABRICKS_TOKEN=dapideadbeefdeadbeefdeadbeef

Verify configuration, connection and Databricks labs:

databricks auth env
databricks clusters list
databricks labs list

Install UCX, do not select options to open config.yml or README.py in a browser:

databricks labs install ucx

To Upgrade UCX, do not select options to open config.yml or README.py in a browser:

databricks labs uninstall ucx
databricks labs install ucx