relferreira / metabase-sparksql-databricks-driver

GNU Affero General Public License v3.0
30 stars 32 forks source link

Only reads username and password from JDBC flags, not form fields #6

Open snarfed opened 2 years ago

snarfed commented 2 years ago

Minor issue, just filing to track: the driver doesn't currently seem to use the Username or Password form fields. When I fill those in and also fill in a JDBC connection string without UID or PWD, I get one of these two errors:

2022-09-14 10:42:14,339 ERROR api.database :: Cannot connect to Database
java.lang.Exception: [Databricks][JDBC](10100) Connection Refused: [Databricks][JDBC](11640) Required Connection Key(s): PWD; [Databricks][JDBC](11480) Optional Connection Key(s): AllowSelfSignedCerts, AsyncExecPollInterval, AutomaticColumnRename, CAIssuedCertNamesMismatch, CatalogSchemaSwitch, DecimalColumnScale, DefaultStringColumnLength, DelegationToken, DelegationUID, DnsResolver, DnsResolverArg, FastConnection, krbJAASFile, NonSSPs, PreparedMetaLimitZero, RowsFetchedPerBlock, ServerVersion, ServiceDiscoveryMode, SocketFactory, SocketFactoryArg, SocketTimeOut, SSLKeyStore, SSLKeyStorePwd, SSLTrustStore, SSLTrustStorePwd, StripCatalogName, UID, UseCustomTypeCoercionMap, UseNativeQuery
2022-09-14 10:42:55,786 ERROR api.database :: Cannot connect to Database
java.lang.Exception: [Databricks][JDSI](20280) Required setting UID is not present in connection settings.

When I add both UID and PWD to the JDBC connection string, it ignores the username and password form fields and connects fine.

Not a big deal, just a heads up. Thanks again for this driver!