databricks / databricks-sql-go

Golang database/sql driver for Databricks SQL.
Apache License 2.0
37 stars 41 forks source link

Connecting to specific catalog not working #139

Closed gilsegment closed 1 year ago

gilsegment commented 1 year ago

In the README there is this example db, err := sql.Open("databricks", "token:****@****.databricks.com:443/sql/1.0/endpoints/****") And it also says the DNS format is: token:[your token]@[Workspace hostname]:[Port number][Endpoint HTTP Path]?param=value

So I figured that if I want to add catalog like described here https://docs.databricks.com/integrations/jdbc-odbc-bi.html#default-catalog-and-schema The URL should be token:[your token]@[Workspace hostname]:[Port number][Endpoint HTTP Path]?ConnCatalog=main However this doesn't seems to work:

Configuration ConnCatalog is not available.",....,"message":"databricks: failed to execute query: query SET `ConnCatalog` = `main`;"}
gilsegment commented 1 year ago

After I changed ConnCatalog to catalog it seems to work

susodapop commented 1 year ago

@gilsegment is there a typo in your most recent post? Those two strings are identical.

gilsegment commented 1 year ago

@susodapop Ohh yea sorry, I just edited it. Might be worth updating the readme

rcypher-databricks commented 1 year ago

I will update the readme in the next release. Are you ok with closing this issue?

gilsegment commented 1 year ago

Closed :)