How can I use Visual Studio Code with Databricks?

Visual Studio Code by Microsoft is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS, and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages and runtimes (such as C++, C#, Java, Python, PHP, Go, and .NET). Visual Studio Code combines the simplicity of a source code editor with powerful developer tooling, like IntelliSense code completion and debugging. You can use Visual Studio Code on your local development machine to write, run, and debug code in Databricks, interact with Databricks SQL warehouses in remote Databricks workspaces, and more, as follows:

Name

Use this when you want to…

Databricks extension for Visual Studio Code

Use Visual Studio Code to write and run local Python, R, Scala, and SQL code on a remote Databricks workspace.

Databricks Connect in Visual Studio Code with Python

Use Visual Studio Code to write, run, and debug local Python code on a remote Databricks workspace.

Databricks Connect in Visual Studio Code with Scala

Use Visual Studio Code to write, run, and debug local Scala code on a remote Databricks workspace.

Databricks Asset Bundles

Use Visual Studio Code to make authoring, deploying, and running bundles easier. Databricks Asset Bundles (or bundles for short) enable you to programmatically define, deploy, and run Databricks jobs, Delta Live Tables pipelines, and MLOps Stacks by using CI/CD best practices and workflows.

Databricks CLI

Use the built-in Terminal in Visual Studio Code to work with Databricks from the command line.

Databricks SDKs

Use the built-in programming language support in Visual Studio Code to write, run, and debug Python, Java, and Go code that works with Databricks.

Databricks Driver for SQLTools

Use a graphical user interface in Visual Studio Code to query Databricks SQL warehouses in remote Databricks workspaces.

Databricks SQL connectors, drivers, and APIs

Use the built-in programming language support in Visual Studio Code to write, run, and debug Python, Go, JavaScript, TypeScript, and Node.js code that works with Databricks SQL warehouses in remote Databricks workspaces.

Provision infrastructure

Use third-party plugins such as the Hashicorp Terraform Extension for Visual Studio Code to make it easier to provision Databricks infrastructure with Terraform and follow infrastructure-as-code (IaC) best practices. Use the built-in programming language support in Visual Studio Code to write and deploy Python, TypeScript, Java, C#, and Go definitions of Databricks infrastructure through third-party offerings such as the Cloud Development Kit for Terraform (CDKTF) and Pulumi.