Databricks extension for Visual Studio Code

Before you begin

Before you can use the Databricks extension for Visual Studio Code, your Databricks workspace and your local development machine must meet the following requirements. You must also have an access token to authenticate with Databricks.

  • Workspace requirements
  • Access token
  • Local development machine requirements

Workspace requirements

enable Files in Repos

คอนฟิกไฟล์ %USERPROFILE%\.databrickscfg เช่น C:\Users\jack\.databrickscfg

[DEFAULT]
host = https://dbc-xxx2345c-yyyy.cloud.databricks.com
token = dapi1234567xxx123456yyyy123456789012

[DEV]
host = https://dbc-xxx3456d-yyyy.cloud.databricks.com
token = dapi2345678xxx234567yyyy234567890123

Access token

You must have a Databricks personal access token. If you do not have one available, you can generate a personal access token now.

Local development machine requirements

Visual Studio Code version 1.69.1 or higher.

ติดตั้ง Extension

ทดสอบ

from pyspark.sql import SparkSession

spark: SparkSession = spark
print("Hello from Databricks")