Closed snarfed closed 2 years ago
Hi again @relferreira! Just checking in here. I'm guessing this might be straightforward, want me to see if I can fix it? Feel free to point me to anywhere specific in the code you think I should start looking!
Hello, @snarfed. I'll take a look as soon as possible. Looking at this line:
It should already support other databases, but I haven't debugged it yet.
I've dug in a bit here, and I don't have a fix yet, but I have learned a couple things that might help.
First, in this line you mentioned:
...should there be a separator between db
and jdbc-flags
? Right now it concatenates them directly, ie if db
is foo
and jdbc-flags
is jdbc:spark://adb-123.azuredatabricks.net:443/...
, then :subname
here ends up something like //adb-123.azuredatabricks.net:443/foojdbc:spark://adb-123.azuredatabricks.net:443/...
, which seems wrong.
Second, looking at sql-jdbc.conn/connection-details->spec
:
The ->
seems to lose all of the keys in the map when it hits sparksql-databricks
. After the (select-keys [:host :port :db :jdbc-flags :dbname])
line, it has values for :host :port :db :jdbc-flags
, but after sparksql-databricks
, it instead has :classname :subprotocol :subname
. Is that expected?
Hello @snarfed, unfortunately, I'm on vacation now, but I think that you are passing the full connection URL to the JDBC params. It should be something like
Aha, that was the problem. User error, ugh. Apologies for the false alarm, thank you for the answer!
Don't worry, it happens with all of us.😅 Maybe we can improve the docs in the future
Cross posted from https://github.com/metabase/metabase/issues/10029#issuecomment-1220128324 : I can't get it to connect to any database other than
default
. It seems to ignore both the Database name field and the path in thejdbc:spark://
URI in the JDBC connection string. eg when I enter a JDBC connection URI that starts withjdbc:spark://adb-...1.azuredatabricks.net:443/benchmarks;...
, it ignores the/benchmarks
path and still uses the default database. Any idea how I can tell it the database name?