-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with DSN parsing when using with Databricks SQL Driver #358
Comments
Hi @nverkhachoyan, thanks for raising this issue.
Lines 78 to 87 in f079f75
There is a potential way that I can try to pass the DSN to the Before that, you can use db, err := sql.Open("databricks", dsn)
otDriver := otelsql.WrapDriver(dri)
connector, err := otDriver.(driver.DriverContext).OpenConnector(mysqlDSN)
if err != nil {
panic(err)
}
// Connect to database
db = sql.OpenDB(connector)
defer db.Close() |
@nverkhachoyan I have made a release that includes the fix. https://github.com/XSAM/otelsql/releases/tag/v0.34.0 You can now use |
Description
It looks like otelsql is passing an empty string as the DSN when calling sql.Open(driverName, ""). As a result, the Databricks SQL driver isn’t getting the proper DSN it needs to parse, which leads to the following error:
The otelsql code that makes the function call
And the Databricks SQL Driver code that attempts to parse it.
Environment
Steps To Reproduce
The simple code snippet below is enough to reproduce the error.
Expected behavior
The Databricks driver should properly receive and parse the DSN string, and the opened connection should be wrapped with otelsql.
Actual behavior
Returns an invalid DSN error
The text was updated successfully, but these errors were encountered: