Skip to content

Fix DBConnect support in VS Code #3 (SDK)#1254

Closed
fjakobs wants to merge 3 commits intomainfrom
spark-session3
Closed

Fix DBConnect support in VS Code #3 (SDK)#1254
fjakobs wants to merge 3 commits intomainfrom
spark-session3

Conversation

@fjakobs
Copy link
Copy Markdown
Contributor

@fjakobs fjakobs commented Mar 4, 2024

Changes

This is the same as #1239 except that this code uses the Databricks SDK to get a Spark session. This version also supports older DBRs.

Note that this change requires databricks/databricks-sdk-py#562 to be released.

Tests

@fjakobs fjakobs changed the title Spark session3 Fix DBConnect support in VS Code #3 (SDK) Mar 4, 2024

def main():
get_taxis().show(5)
from databricks.sdk.runtime import spark
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In which environments does this work? Older runtimes, DLT, etc.?

Copy link
Copy Markdown
Contributor Author

@fjakobs fjakobs Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works in DBR >= 12, DLT, and OSS

@fjakobs
Copy link
Copy Markdown
Contributor Author

fjakobs commented Mar 5, 2024

closing in favor of #1253

@fjakobs fjakobs closed this Mar 5, 2024
@fjakobs fjakobs deleted the spark-session3 branch March 5, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants