-
Notifications
You must be signed in to change notification settings - Fork 107
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
Automate httpPath
by pulling from Databricks REST API
#689
Comments
I wonder why the driver doesn't automate this? |
I think it is because the user can either use the SQL Warehouse service, or a running Spark cluster as the end-point for the ODBC connection: https://docs.databricks.com/en/integrations/jdbc-odbc-bi.html#retrieve-the-connection-details Wow, come to think of it, I bet there is a way to also pull the path from a cluster via the REST API, so you could potentially have it switch between the two (SQL warehouse or Spark cluster) if the user provides a |
Originally I did want to automate finding the Secondly, Databricks's API only lists the HTTP path for SQL Warehouses. There's no equivalent field for clusters. If you poke around at their frontend code, you'll see that the HTTP path for clusters is computed programmatically from the "account ID" -- but there's no way to find the account ID for a given workspace/host from their official APIs, it's just injected into the frontend as a query parameter. So we'd need to wait for such a field to be exposed in their API. Other tools in the Databricks ecosystem require the user to provide the account ID to work out these paths. |
Right now the Databricks integration in RStudio Pro can do things like generate a connection snippet for a given cluster, and it has a full API client. I expect that as that integration becomes more sophisticated and grows support for SQL warehouses, it might be able to generate the |
So probably best to leave alone in odbc, and assume a higher level tool will set appropriately? |
Maybe do that in an Shiny based snippet, like inside |
The Databricks REST API has a “SQL warehouse” endpoint, where you can pull the
httpPath
value from, here is an example usinghttr2
, which I guessodbc
would need to take a dependency against, unless y’all prefer to implement something like this at a lower level, here’s the example:I was thinking it makes sense to automate seeing that it may be the only argument in
databricks()
that does not yet have a way, even in a happy path, for it to be automated.The text was updated successfully, but these errors were encountered: