Command Palette commands for the Databricks extension for Visual Studio Code

This article lists Command Palette commands for the Databricks extension for Visual Studio Code. See What is the Databricks extension for Visual Studio Code?.

Command reference

The Databricks extension for Visual Studio Code adds the following commands to the Visual Studio Code Command Palette. See also Command Palette in the Visual Studio Code documentation.

Command

Description

Databricks: Change Python environment

Change the Python virtual environment

Databricks: Configure autocomplete for Databricks globals

Enables IntelliSense in the Visual Studio Code code editor for PySpark, Databricks Utilities, and related globals such as spark and dbutils. For more information about this feature, see PySpark and Databricks Utilities code completion.

Databricks: Configure cluster

Moves focus to the Command Palette to create, select, or change the Databricks cluster to use for the current project.

See Select a cluster for running code and jobs.

Databricks: Debug current file with Databricks Connect

Debug the current file with Databricks Connect.

Databricks: Deploy bundle

Deploy the bundle to the Databricks workspace.

Databricks: Destroy bundle

Destroy the bundle.

Databricks: Detach cluster

Removes the reference to the Databricks cluster from the current project.

Databricks: Focus on Bundle Resource Explorer View

Moves focus in the Databricks panel to the Bundle Resource Explorer view.

See Bundle Resource Explorer.

Databricks: Focus on Bundle Variables View

Moves focus in the Databricks panel to the Bundle Variables View.

See Bundle Variables View.

Databricks: Focus on Configuration View

Moves focus in the Databricks panel to the Configuration view.

Databricks: Force deploy bundle

Ignore warnings and force a deploy of the bundle to the Databricks workspace.

Databricks: Force destroy bundle

Ignore warnings and force a destroy the bundle.

Databricks: Initialize new project

Initialize the creation workflow for a new Databricks project in Visual Studio Code.

Databricks: Logout

Resets the Databricks panel to show the Configure Databricks and Show Quickstart buttons in the Configuration view. Any content in the current project’s .databricks/project.json file is also reset.

Databricks: Open Databricks configuration file

Opens the Databricks configuration profiles file, from the default location, for the current project.

See Configure your Databricks project using the Databricks extension for Visual Studio Code.

Databricks: Open full logs

Opens the folder that contains the application log files that the Databricks extension for Visual Studio Code writes to your development machine.

Databricks: Override bundle variables

Overrides bundle variables.

Databricks: Refresh python environment status

Refreshes the Python Environment view in the Databricks panel.

Databricks: Refresh remote state

Refreshes the bundle configuration for the target.

Databricks: Reinstall Databricks Connect

Reinstall Databricks Connect. See Debug code using Databricks Connect for the Databricks extension for Visual Studio Code.

Databricks: Reset bundle variables to default values

Resets bundle variable values.

Databricks: Run current file with Databricks Connect

Runs current file with Databricks Connect. See Debug code using Databricks Connect for the Databricks extension for Visual Studio Code.

Databricks: Select a Databricks Asset Bundle target

Select a Databricks Asset Bundle target. See Change the target deployment workspace.

Databricks: Show bundle logs

Shows bundle logs. See View Databricks log output.

Databricks: Show Quickstart

Shows the Quickstart file in the editor.

Databricks: Sign in to Databricks workspace

Sign in to a workspace.

Databricks: Start Cluster

Starts the cluster if it is already stopped.

Databricks: Start synchronization

Starts synchronizing the current project’s code to the Databricks workspace.

This command performs an incremental synchronization.

Databricks: Start synchronization (full sync)

Starts synchronizing the current project’s code to the Databricks workspace.

This command performs a full synchronization, even if an incremental sync is possible.

Databricks: Stop Cluster

Stops the cluster if it is already running.

Databricks: Stop synchronization

Stops synchronizing the current project’s code to the Databricks workspace.

Databricks: Verify Databricks notebook init scripts

Verify Databricks notebook init scripts.

PySpark and Databricks Utilities code completion

This article describes how to enable PySpark and Databricks Utilities code completion for the Databricks extension for Visual Studio Code. See What is the Databricks extension for Visual Studio Code?

This information assumes that you have already installed and set up the Databricks extension for Visual Studio Code. See Install the Databricks extension for Visual Studio Code.

To enable IntelliSense (also known as code completion) in the Visual Studio Code code editor for PySpark, Databricks Utilities, and related globals such as spark and dbutils, do the following with your project opened:

  1. On the Command Palette (View > Command Palette), type >Databricks: Configure autocomplete for Databricks globals and press Enter.

  2. Follow the on-screen prompts to allow the Databricks extension for Visual Studio Code to install PySpark for your project, and to add or modify the __builtins__.pyi file for your project to enable Databricks Utilities.

You can now use globals such as spark and dbutils in your code without declaring any related import statements beforehand.