You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a Visual Studio Code extension that allows you to work with Databricks locally from VSCode in an efficient way, having everything you need integrated into VS Code - see [Features](#features). It allows you to manage and execute your notebooks, start/stop clusters, execute jobs and much more!
9
+
This is a Visual Studio Code extension that allows you to work with Databricks locally from VSCode in an efficient way, having everything you need integrated into VS Code - see [Features](#features). It allows you to execute your notebooks, start/stop clusters, execute jobs and much more!
10
10
11
11
The extensions can be downloaded from the official Visual Studio Code extension gallery: [Databricks VSCode](https://marketplace.visualstudio.com/items?itemName=paiqo.databricks-vscode)
12
12
@@ -36,6 +36,7 @@ The extensions can be downloaded from the official Visual Studio Code extension
36
36
- control how notebooks are downloaded (Jupyter notebook, source code, ...)
37
37
- various other settings
38
38
- Load Databricks directly from your Azure Account
39
+
- Leverage connections configured by the official Databricks VSCode extension
39
40
-[SQL / Data Browser](#sql-browser)
40
41
- Browse availabl SQL objects from the Databricks metastore
41
42
- databases, tables and views, columns, ...
@@ -65,11 +66,14 @@ Alternatively it can also be downloaded the `.vsix` directly from the VS Code m
65
66
66
67
Preview-Versions might also be available via github [Releases](https://github.com/paiqo/Databricks-VSCode/releases) from this repository.
67
68
68
-
# Setup and Configuration (VSCode Connection Manager)
69
+
# Setup and Configuration
69
70
The configuration happens directly via VS Code by simply [opening the settings](https://code.visualstudio.com/docs/getstarted/settings#_creating-user-and-workspace-settings)
70
71
Then either search for "Databricks" or expand Extensions -> Databricks.
71
-
The settings themselves are very well described and it should be easy for you to populate them. Also, not all of them are mandatory! Some of the optional settings are experimental or still work in progress.
72
-
To configure multiple Databricks Connections/workspaces, you need to use the JSON editor and add them to `databricks.connections`:
72
+
The most important setting to start with is definitly `databricks.connectionManager` as it defines how you manage your connections. There are a couple of differnt options which are described further down below.
73
+
All the settings themselves are very well described and it should be easy for you to populate them. Also, not all of them are mandatory, and depend a lot on the connection manager that you have chosen.Some of the optional settings are experimental or still work in progress.
74
+
75
+
# Setup and Configuration (VSCode Connection Manager)
76
+
Using `VSCode Settings` as your connection manager allows you to define and manage your connections directly from within VSCode via regular VSCode settings. It is recommended to use workspace settings over user settings here as it might get confusing otherwise. The default connection can be configured directly via the settings UI using the `databricks.connection.default.*` settings. To configure multiple Databricks Connections/workspaces, you need to use the JSON editor and add them to `databricks.connections`:
73
77
74
78
```json
75
79
...
@@ -169,13 +173,18 @@ The following Azure-specific settings exist and can be set in the workspace sett
169
173
170
174
They are documented via VSCode settings documentation.
171
175
176
+
# Setup and Configuration (Databricks Extension Connection Manager)
177
+
This connection manager leverages the [official Databricks extensions](https://marketplace.visualstudio.com/items?itemName=databricks.databricks) to establish a connection with your Databricks workspace. It only supports a single connection hence the actual Connection Manager tab will be hidden for this connection manager.
178
+
It also derives the cluster automatically from the Databricks extensions to source the [SQL Browser](#sql-browser) but also allows you to change it directly from the [Cluster Manager](#cluster-manager) using the `Attach cluster` command from the context menu!
-`Manual` where you are simply prompted to enter connection information at the start of your session.
180
189
181
190
You can specify the one to use by setting the VSCode setting `databricks.connectionManager`.
@@ -215,10 +224,12 @@ For better visualization of tabluar results this extension includes a dependency
215
224
216
225
Notebook Kernels also support other features like [Files in Repo](https://docs.databricks.com/_static/notebooks/files-in-repos.html) to build libraries within your repo, [_sqldf](https://docs.databricks.com/notebooks/notebooks-use.html#explore-sql-cell-results-in-python-notebooks-natively-using-python) to expose results of SQL cells to Python/Pyspark, `%run` to run other notebooks inline with the current notebook and also [dbutils.notebook.run()](https://docs.databricks.com/dev-tools/databricks-utils.html#notebook-utility-dbutilsnotebook).
217
226
218
-
Whenever a notebook is opened from either the local sync folder or via the [Virtual File System](#file-system-integration) using `dbws:/` URI, the Databricks notebook kernels are the preferred ones and should appear at the top of the list when you select a kernel.
227
+
Whenever a notebook is opened from either the local sync folder or via the [Virtual File System](#file-system-integration) using `wsfs:/` URI, the Databricks notebook kernels are the preferred ones and should appear at the top of the list when you select a kernel.
228
+
229
+
If you are using the [Databricks Extension Connection Manager](#setup-and-configuration-databricks-extension-connection-manager) we will also create a generic notebook kernel for you which used the configured cluster.
219
230
220
231
## Execution Modes
221
-
We distinguish between Live-execution and Offline-execution. In Live-execution mode, files are opened directly from Databricks by mounting the Databricks Workspace into your VSCode Workspace using `dbws:/` URI scheme. In this mode there is no intermediate local copy but you work directly against the Databricks Workspace. Everything you run must already exist online in the Databricks Workspace.
232
+
We distinguish between Live-execution and Offline-execution. In Live-execution mode, files are opened directly from Databricks by mounting the Databricks Workspace into your VSCode Workspace using `wsfs:/` URI scheme. In this mode there is no intermediate local copy but you work directly against the Databricks Workspace. Everything you run must already exist online in the Databricks Workspace.
222
233
223
234
This is slightly different in Offline-execution where all files you want to work with need to be synced locally first using the [Workspace Manager](#workspace-manager). This is especially important when it comes `%run` which behaves slightly differntly compared to Live-execution mode. `%run` in Offline-execution runs the code from your local file instead of the code that exists in Dtabricks online!
224
235
Other commands like `dbutils.notebook.run()` always use the code thats currently online so if you have changed the refernced notebook locally, you have to upload it first. This is simply because we cannot easily replicate the behavior of `dbutils.notebook.run()` locally!
@@ -245,7 +256,8 @@ You want to upload a local notebook to the Databricks workspace? Simply drag&dro
245
256
You want to download a file from DBFS? Simply drag&drop it!
246
257
247
258
There are two virtual file systems that come with this extension:
248
-
-`dbws:/` to access your notebook from the DAtabricks workspace
259
+
-`wsfs:/` to access your notebook from the DAtabricks workspace
260
+
-`dbws:/` (LEGACY) - to be replaced by `wsfs:/` in the long term
249
261
-`dbfs:/` to access files on the Databricks File System (DBFS) - similar to the [DBFS Browser](#dbfs-browser)
0 commit comments