You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on integrating go-duckdb with MotherDuck, and while I'm not entirely sure if the Appender functionality is officially supported in this context, I couldn’t find any information suggesting it shouldn't be.
However, when I try to use the Appender, I encounter the following error:
panic: database/sql/driver: duckdb error: DuckTransaction::Get called on non-DuckDB transaction
could not close appender: appended data has been invalidated due to corrupt row
goroutine 1 [running]:
main.main()
/home/dima/projects/motherduck-appender-repro/main.go:23 +0x1ab
exit status 2
To reproduce the issue, the simplest code looks like this:
package main
import (
"context""database/sql""fmt""github.com/marcboeker/go-duckdb"
)
funcmain() {
connector, _:=duckdb.NewConnector("md:example?motherduck_token=<access_token>", nil)
db:=sql.OpenDB(connector)
db.Exec(`CREATE TABLE IF NOT EXISTS example ( num INTEGER );`)
conn, _:=connector.Connect(context.Background())
appender, _:=duckdb.NewAppenderFromConn(conn, "", "example")
appender.AppendRow(2)
err:=appender.Close()
iferr!=nil {
panic(err)
}
varnumintdb.QueryRow(`SELECT num FROM example;`).Scan(&num)
fmt.Println(num)
}
Steps to Reproduce:
Use the provided code snippet.
Run it with MotherDuck as the backend (md:example?motherduck_token=<access_token>).
Observe the panic during appender.Close().
Expected Behavior:
The Appender should append the row to the specified table and close gracefully without errors.
Actual Behavior:
The application panics during the appender.Close() call with the error message provided above.
Environment:
Go Version: go version go1.23.4 linux/amd64
Library Version: github.com/marcboeker/go-duckdb v1.8.3
Backend: MotherDuck
Additional Context:
I’d like to confirm whether the Appender is expected to work with MotherDuck. If not, it would be helpful to document its limitations in this context.
Thanks in advance for your help!
The text was updated successfully, but these errors were encountered:
Hi,
I'm working on integrating go-duckdb with MotherDuck, and while I'm not entirely sure if the Appender functionality is officially supported in this context, I couldn’t find any information suggesting it shouldn't be.
However, when I try to use the Appender, I encounter the following error:
To reproduce the issue, the simplest code looks like this:
Steps to Reproduce:
Expected Behavior:
The Appender should append the row to the specified table and close gracefully without errors.
Actual Behavior:
The application panics during the appender.Close() call with the error message provided above.
Environment:
Go Version: go version go1.23.4 linux/amd64
Library Version: github.com/marcboeker/go-duckdb v1.8.3
Backend: MotherDuck
Additional Context:
I’d like to confirm whether the Appender is expected to work with MotherDuck. If not, it would be helpful to document its limitations in this context.
Thanks in advance for your help!
The text was updated successfully, but these errors were encountered: