-
Notifications
You must be signed in to change notification settings - Fork 116
Description
Hello, below are the details of what I am trying to do
import (
_ "github.com/snowflakedb/gosnowflake" // Snowflake
"github.com/aws/aws-xray-sdk-go/xray"
"github.com/jmoiron/sqlx"
)
func main() {
dsn := ""
sqlDB, err := xray.SQLContext("snowflake", dsn)
if err != nil {
panic(err)
}
sqlxDB := sqlx.NewDb(sqlDB, "snowflake")
rows, rowErr := sqlxDB.QueryContext(context.Background(), "SELECT 1")
if rowErr != nil {
panic(rowErr)
}
}
During debugging the QueryContext
context statement I found the below call stack.
Now the problem as per my understanding is that the [newDBAttribute](https://github.com/aws/aws-xray-sdk-go/blob/e9627da6f47902f96f26c577cbe6f9244987a4fb/xray/sql_context.go#L370)
call under sql_context.go only seems to be supporting postgres
, mysql
, and oracle
driver types because of which the meta query being fired in case of snowflake is SELECT version(), current_user, current_database()
and the Snowflake version()
equivalent is [current_version()](https://docs.snowflake.com/en/sql-reference/functions/current_version)
which results in some error logs.
Version I am using
go 1.21.0
aws-xray-sdk-go v1.8.3
snowflakedb/gosnowflake v1.8.0