Skip to content
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

Parquet write fails with DuckDB.dll 0.2.8 #13

Closed
mmauri opened this issue Sep 4, 2021 · 7 comments
Closed

Parquet write fails with DuckDB.dll 0.2.8 #13

mmauri opened this issue Sep 4, 2021 · 7 comments
Labels

Comments

@mmauri
Copy link

mmauri commented Sep 4, 2021

Thanks for fixing the previous issue so quick.
I have tried to write a parquet file and it throws this error:
Catalog Error: Copy Function with name parquet does not exist!
Did you mean "csv"?

It works on the CLI duckdb.exe, I haven't found any doc stating that the C++ API does not support Parquet, so I don't know if the issue is about your bindings or the Dll API itself.

using var conn = new DuckDBConnection("Data Source=:memory:");
try
{
    conn.Open();
    var command = conn.CreateCommand();

    command.CommandText = "CREATE TABLE integers(foo INTEGER, bar INTEGER);";
    var executeNonQuery = command.ExecuteNonQuery();

    command.CommandText = "INSERT INTO integers VALUES (3, 4), (5, 6), (7, 8);";
    executeNonQuery = command.ExecuteNonQuery();

    command.CommandText = "SELECT foo, bar FROM integers";
    var reader = command.ExecuteReader();

    command.CommandText = "COPY (SELECT * FROM integers) TO 'result-snappy.parquet' (FORMAT 'parquet');";
    executeNonQuery = command.ExecuteNonQuery();
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Thanks for your effort bringing DuckDB to .NET!

@Giorgi
Copy link
Owner

Giorgi commented Sep 4, 2021

I think it is the same issue as Copy table to parquet does not work in Node.js environment

As stated there:

Yes, we are currently not shipping the Parquet extension with the node client. We probably should do that.

See also: How to build a static library with extensions

@Giorgi Giorgi added the external label Sep 4, 2021
@mmauri
Copy link
Author

mmauri commented Sep 6, 2021

Thanks,
Let's hope that they include the extensions on the C++ API, as they do in the Python/R packages.

@SartorialOffense
Copy link
Contributor

So they were kind enough to add it in by default:

duckdb/duckdb#2563

I pulled out the new DLL and tested it with a Parquet file in your sample application.

@Giorgi
Copy link
Owner

Giorgi commented Nov 9, 2021

Did it work?

@SartorialOffense
Copy link
Contributor

SartorialOffense commented Nov 9, 2021 via email

@Giorgi Giorgi closed this as completed Nov 10, 2021
@mmauri
Copy link
Author

mmauri commented Nov 14, 2021

Great news!! Thanks Sartorial, for your help on the duckdb repo!

@SartorialOffense
Copy link
Contributor

SartorialOffense commented Nov 15, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants