marcboeker / go-duckdb

go-duckdb provides a database/sql driver for the DuckDB database engine.
MIT License
705 stars 105 forks source link

Copy function with parquet format is not working #123

Closed avichalp closed 1 year ago

avichalp commented 1 year ago

Hi,

I am trying to export a table to a parquet file. I am following the syntax as described on the DuckDb docs.

Essentially this is what my code is doing:

res, err := db.Exec("COPY (SELECT * FROM my_test_table) TO 'output.csv' (FORMAT CSV);")

However, I get this error:

Catalog Error: Copy Function with name parquet does not exist!
Did you mean "csv"?

This issue also seems similar to #23

I am using:

avichalp commented 1 year ago

It turns out that I needed to install and load the extension as described here: #85