Select a cluster for the Databricks extension for Visual Studio Code

This article describes how to select a Databricks cluster for the Databricks extension for Visual Studio Code to use. See What is the Databricks extension for Visual Studio Code?.

The following information assumes that you have already set up the Databricks extension for Visual Studio Code for authentication with your Databricks workspace. See Authentication setup for the Databricks extension for Visual Studio Code.

Note

If you have already completed the VSCode extension for Databricks tutorial: Run Python on a cluster and as a job, and you want to keep using the Databricks cluster from that tutorial, skip ahead to Select a workspace directory for the Databricks extension for Visual Studio Code.

With the extension and your code project opened, select an existing Databricks cluster that you want to use, or create a new Databricks cluster and use it.

Use an existing cluster

If you have an existing Databricks cluster that you want to use, do one of the following:

Create a new cluster

If you do not have an existing Databricks cluster, or you want to create a new one and use it, do the following:

  1. In the Configuration pane, next to Cluster, click the gear (Configure cluster) icon.

    Configure cluster icon 2
  2. In the Command Palette, click Create New Cluster.

  3. When prompted to open the external website (your Databricks workspace), click Open.

  4. If prompted, sign in to your Databricks workspace.

  5. Follow the instructions to create a cluster.

Note

Databricks recommends that you create a Personal Compute cluster. This enables you to start running workloads immediately, minimizing compute management overhead.

  1. After the cluster is created and is running, go back to Visual Studio Code.

  2. Do one of the following: