databrickslabs / databricks-sdk-r

Databricks SDK for R (Experimental)
https://databrickslabs.github.io/databricks-sdk-r/
Apache License 2.0
19 stars 4 forks source link

support DATABRICKS_HOST without `https://` #22

Closed dskard closed 6 months ago

dskard commented 10 months ago

Does the R SDK support using a DATABRICKS_HOST without https://?

When I try to connect to a Databricks instance without the https://, I get an error from curl::curl_fetch_memory(), but when I add the https:// I am able to connect and list clusters. Here are some example commands:

> Sys.setenv(DATABRICKS_HOST="dbc-12345.cloud.databricks.com")
> client <- DatabricksClient()
> clustersList(client)[, "cluster_name"]
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Bad URL, colon is first character
> Sys.setenv(DATABRICKS_HOST="https://dbc-12345.cloud.databricks.com")
> client <- DatabricksClient()
> clustersList(client)[, "cluster_name"]
[1] "Cluster A"                            

If this is not currently supported, can support for this be added? A number of the other Databricks libraries support setting the DATABRICKS_HOST with and without https://.