github.com/databricks/databricks-sql-go (go): Package dbsql implements the go driver to Databricks SQL  Clients should use the database/sql package in conjunction with the driver:  Use sql.Open() to create a database handle via a data source name string:  The DSN format is:  Supported optional connection parameters can be specified in param=value and include:  Supported optional session parameters can be specified in param=value and include:  Use sql.OpenDB() to create a database handle via a new connector object created with dbsql.NewConnector():  Supported functional options include:  Cancelling a query via context cancellation or timeout is supported.  Use the driverctx package under driverctx/ctx.go to add CorrelationId and ConnId to the context. CorrelationId and ConnId makes it convenient to parse and create metrics in logging.  **Connection Id** Internal id to track what happens under a connection. Connections can be reused so this would track across queries.  **Query Id** Internal id to track what happens under a query. Useful because the same query can be used with multiple connections.  **Correlation Id** External id, such as request ID, to track what happens under a request. Useful to track multiple connections in the same request.  Use the logger package under logger.go to set up logging (from zerolog). By default, logging level is `warn`. If you want to disable logging, use `disabled`. The user can also utilize Track() and Duration() to custom log the elapsed time of anything tracked.  The result log may look like this:  There are three error types exposed via dbsql/errors  Each type has a corresponding sentinel value which can be used with errors.Is() to determine if one of the types is present in an error chain.  Example usage:  See the documentation for dbsql/errors for more information.  ==================================  Databricks Type --> Golang Type  ==================================  BOOLEAN --> bool  TINYINT --> int8  SMALLINT --> int16  INT --> int32  BIGINT --> int64  FLOAT --> float32  DOUBLE --> float64  VOID --> nil  STRING --> string  DATE --> time.Time  TIMESTAMP --> time.Time  DECIMAL(p,s) --> sql.RawBytes  BINARY --> sql.RawBytes  ARRAY<elementType> --> sql.RawBytes  STRUCT --> sql.RawBytes  MAP<keyType, valueType> --> sql.RawBytes  INTERVAL (year-month) --> string  INTERVAL (day-time) --> string  For ARRAY, STRUCT, and MAP types, sql.Scan can cast sql.RawBytes to JSON string, which can be unmarshalled to Golang arrays, maps, and structs. For example:  May generate the following row:
Keywords: databricks|dwh|golang|golang-library|sql