Introduction
This is the second blogpost in a series about setting up an environment and perform a small project in Databricks. The first blogpost was about the installation of Databricks local IDE and this is the second blogpost in the series. In this blogpost w'll continue setting up the environment and make a connection to the workspace in Databricks.
This is the first blogpost in the series : Databricks series : Starting a new python project in Visual Studio Code (Part I)
These are the steps I've taken to setup the connection :
- Open the Databricks sidebar in Visual Studio Code and configure a new connection.
- Select your Databricks Workspace.
- Configure authentication, for example, using OAuth.
- Sign in through your browser.
- Select the desired compute resource.
- Setup the Python environment.
Create a configuration
First you need to setup a configuration in Visual Studio Code.
Fill the URL to the Databricks environment.
And select OAUTH (in my case)
And give the profile a proper name. I called it DBProfile.
Sign in with your account to Databricks.
A verification code is necessary to enter and if all is verified then you are authenticated.
And in Visual Studio Code you see the following configuration settings:
And there is more information about my Databricks Workspace there.
And I selected v5 as the version for the serverless compute.
Next there is the set up for the Python environment.
winget install --id=astral-sh.uv -e
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
And in the output tab of Visual Studio it states now that the full intstallation of Python for Databricks Connect is succeeded.
Once configured, we now can work with our Databricks environment directly from Visual Studio Code.
Final thoughts
Quite some steps to setup the local environment for connecting to Databricks. Up to the next blogpost!
Hennie




















