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
More of a feature request and very similar to this one: #148
It would be nice to be able to run databricks-sql-connector against a warehouse from a databricks notebook while not leaving the python runtime of the notebook. Other solutions:
spark.sql, but this usually means worse price-performance than using a Databricks SQL warehouse. Some workloads just have a little bit of heavy SQL in them and the rest is easy - its hard to move away from the performance of the SQL warehouse once you're used to it.
spark.sql but fine-tune pyspark settings in the notebook cluster to get similar performance is a pain.
Serverless pyspark - pretty good alternative option, though RAM limits on the driver node can be a pain. Also autoscaling here is pretty "invisible", so if you have a strong prior about workload size a SQL warehouse can be better.
Embed API keys in dbutils.secrets and connect to databricks-sql-connector that way. Annoying, I'm already auth'ed i nthe databricks notebook, why carry an API key around?
With 15.4 and above, authentication in the WorkspaceClient() from the SDK works out of the box in the databricks runtime. That means you can borrow its ability to OAuth to connect to a SQL warehouse without having to generate an API key and embed this anywhere.
This is what it looks like (you'll need a pip install databricks-sql-connector first).
More of a feature request and very similar to this one: #148
It would be nice to be able to run databricks-sql-connector against a warehouse from a databricks notebook while not leaving the python runtime of the notebook. Other solutions:
spark.sql
, but this usually means worse price-performance than using a Databricks SQL warehouse. Some workloads just have a little bit of heavy SQL in them and the rest is easy - its hard to move away from the performance of the SQL warehouse once you're used to it.spark.sql
but fine-tune pyspark settings in the notebook cluster to get similar performance is a pain.dbutils.secrets
and connect todatabricks-sql-connector
that way. Annoying, I'm already auth'ed i nthe databricks notebook, why carry an API key around?With 15.4 and above, authentication in the
WorkspaceClient()
from the SDK works out of the box in the databricks runtime. That means you can borrow its ability toOAuth
to connect to a SQL warehouse without having to generate an API key and embed this anywhere.This is what it looks like (you'll need a
pip install databricks-sql-connector
first).Not sure if this is worth some documentation or example, but it was a solution to an issue we've had for a while. Any thoughts?
The text was updated successfully, but these errors were encountered: