feat: databricks allow disabling spark session#2703
Merged
Conversation
eakmanrq
commented
May 29, 2024
| token=self._extra_config["databricks_connect_access_token"], | ||
| cluster_id=self._extra_config["databricks_connect_cluster_id"], | ||
| ) | ||
| .userAgent("sqlmesh") |
Collaborator
Author
There was a problem hiding this comment.
Missed this userAgent when I added support before.
treysp
reviewed
May 30, 2024
| | `databricks_connect_cluster_id` | Databricks Connect Only: Databricks Connect cluster ID. Uses `http_path` if not set. Cannot be a Databricks SQL Warehouse. | string | N | | ||
| | `force_databricks_connect` | When running locally, force the use of Databricks Connect for all model operations (so don't use SQL Connector for SQL models) | bool | N | | ||
| | `disable_databricks_connect` | When running locally, disable the use of Databricks Connect for all model operations (so use SQL Connector for all models) | bool | N | | ||
| | `disable_spark_session` | Do not use SparkSession if it is available (like when running in a notebook). | bool | N | |
Contributor
There was a problem hiding this comment.
Does this feature allow you to not use SparkSession even if it is available, or it allows you to not get warnings when it's not available?
Collaborator
Author
There was a problem hiding this comment.
The former. So when running in a Databricks notebook you will always have a SparkSession available and this lets you say even though it is available you don't want to use it.
izeigerman
reviewed
May 30, 2024
izeigerman
approved these changes
May 31, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prior to this change if a user was running in a databricks notebook we assumed they would want to use the local spark session. This isn't potentially the case though if the user wants to connect to new Serverless SQL from a notebook. So this change allows the user to disable spark session access so they can connect to Serverless SQL.