-
Notifications
You must be signed in to change notification settings - Fork 126
Connections Pane: Databricks Support #10427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
E2E Tests 🚀 |
3d6cf5b to
9c76c2e
Compare
897fb4c to
0ebc034
Compare
f7c113b to
548ce8a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds Databricks SQL Connector support to the Connections Pane, enabling users to browse catalogs, schemas, tables, views, and volumes from Databricks databases.
Key changes:
- Added
has_childrenoptional field to the OpenRPC contract to support leaf nodes like volumes that cannot be expanded - Introduced loading and error states in the UI to handle slow operations and RPC timeouts
- Implemented
DatabricksConnectionclass in Python backend with support for listing objects, fields, and previewing data
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| positron/comms/connections-backend-openrpc.json | Added optional has_children field to ObjectSchema |
| src/vs/workbench/services/languageRuntime/common/positronConnectionsComm.ts | Added TypeScript interface for has_children field |
| src/vs/workbench/services/positronConnections/common/interfaces/positronConnectionsInstance.ts | Updated interface to support undefined entries during loading |
| src/vs/workbench/services/positronConnections/browser/positronConnectionsInstance.ts | Updated to handle has_children field and undefined entries state |
| src/vs/workbench/contrib/positronConnections/browser/components/schemaNavigation.tsx | Added loading/error UI states and delayed spinner for expansion |
| src/vs/workbench/contrib/positronConnections/browser/components/schemaNavigation.css | Added styles for loading states and spinner animation |
| extensions/positron-python/python_files/posit/positron/connections_comm.py | Added has_children field to ObjectSchema model |
| extensions/positron-python/python_files/posit/positron/connections.py | Implemented DatabricksConnection class with full CRUD support |
| extensions/positron-python/python_files/posit/positron/tests/test_connections.py | Added comprehensive test suite for Databricks connections |
| extensions/positron-python/python_files/posit/test-requirements.txt | Added databricks-sql-connector dependency |
| extensions/positron-python/python_files/posit/pinned-test-requirements.txt | Pinned databricks-sql-connector version |
src/vs/workbench/contrib/positronConnections/browser/components/schemaNavigation.tsx
Show resolved
Hide resolved
src/vs/workbench/contrib/positronConnections/browser/components/schemaNavigation.tsx
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/positronConnections/browser/components/schemaNavigation.tsx
Outdated
Show resolved
Hide resolved
extensions/positron-python/python_files/posit/positron/connections.py
Outdated
Show resolved
Hide resolved
extensions/positron-python/python_files/posit/positron/connections.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]> Signed-off-by: Daniel Falbel <[email protected]>
isabelizimm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it out! Things seem to work, but as you noted, it feels quite slow. To load the Connections pane took about a minute. Is this coming from the Databricks Python package? When I run queries in the Console, it doesn't feel as slow.
|
The reason why it's slow is that the first query sent to the databricks cluster is going to trigger the startup of the warehouse cluster. Our cluster is programmed to turn off the warehouse after 45 minutes of inactivity. Subsequent queries are fast enought and that's probably why it didn't feel slow when you tried in the console. But it's also terribly slow if the warehouse is not started and you try to do any query using the python connector from the console. Unfortunatelly, I don't think there's much we can do regarding cold starts. I don't think though this will be a common behavior for users that are connecting to a larger databricks cluster where the warehouse will probably be 'online' most of the time. FWIW this also the behavior in the web app when running a query in stopped cluster: CleanShot.2025-11-13.at.12.36.10.mp4 |
This PR adds databricks support for the connections pane. Addresses #10430
Some Databricks interactions may take a while, like listing all catalogs because of cold starts. Eg if the warehouse is turned off, we may need to wait for it to turn on before the listing can be shown. This leads to RPC timeout errors.
To handle this, we've added a loading state for connections, that is shown while connections don't have any entries to display. We've also made
list_objectsnever timeout, it's up for the implementation of thelist_objectsto timeout if needed and raise an error instead.We've also added a similar loading state when clicking on the expand button. We now show a small spining icon that indicates that something is going on.
Databricks catalgos may have
volumeswhich are leaf like nodes in the DB because they can't be expanded, but they are not table/view 'fields'. To handle this case, we've added a new optional field in the connections openRPC contract called 'has_children', ifFalseit means that the obejct can no longer be expanded. By default this is assumed to beTrueunless the object 'kind' is 'field'.To try it out, you can:
Feel free to ask questions for help with setting up.
Release Notes
New Features
Bug Fixes
QA Notes
@:connections