databricks / databricks-sql-go

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

Lack of clarity which DB connector is used under the hood #181

Closed gilsegment closed 10 months ago

gilsegment commented 11 months ago

This is a request to add a bit more info in the README regarding the connector that is used under the hood.

In the docs it seems that Databricks supports both ODBC and JDBC drivers.

What is being used with this client library to connect to Databricks warehouse JDBC/ODBC/Something else?

I am using this to initialize the connector:

// NewConnector creates a connection that can be used with `sql.OpenDB()`.
// This is an easier way to set up the DB instead of having to construct a DSN string.
func NewConnector(options ...connOption) (driver.Connector, error) {
    // config with default options
    cfg := config.WithDefaults()
susodapop commented 11 months ago

The ODBC, JDBC, Python, NodeJS, and Go connectors all connect to Databricks via thrift.

rcypher-databricks commented 11 months ago

The Go driver is independent of JDBC/ODBC

rcypher-databricks commented 10 months ago

The Go driver uses the Thrift protocol to communicate with the Databricks server, but that is just a protocol for accessing the server side API. There are no other drivers or connectors involved. Unless you have further questions I'm marking this as closed.