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

Support Parquet files in JDBC URLs #108

Open
eirikbakke opened this issue Dec 7, 2024 · 2 comments
Open

Support Parquet files in JDBC URLs #108

eirikbakke opened this issue Dec 7, 2024 · 2 comments

Comments

@eirikbakke
Copy link

Currently, the DuckDB JDBC driver's "jdbc:duckdb:/path/to/file" URL format only accepts files in the DuckDB file format. It would be useful if Parquet files would also be accepted as part of the connection URL.

Currently an exception is thrown: 'The file "/foo/bar/somefile.parquet" exists, but it is not a valid DuckDB database file!'

When connecting directly to a Parquet file with DuckDB's JDBC driver, DatabaseMetaData.getTables and related methods should probably act as if a single database table is available.

The use case is for external graphical tools (e.g. Ultorg in my case) that know how to work with arbitrary JDBC drivers, but which may not know about DuckDB's special "SELECT * FROM read_parquet('input.parquet');" syntax.

@Mause
Copy link
Member

Mause commented Dec 13, 2024

You can do something like

CREATE VIEW input AS SELECT * FROM read_parquet('input.parquet');

then open the DuckDB file in your graphical tool?

@eirikbakke
Copy link
Author

That works! Direct support for Parquet files in the JDBC URL would still be a "nice to have", since it's friendlier to users who are not as familiar with command-line tools.

(In my case I'm actually developing the graphical tool in question, rather than being an end-user of the tool. Eventually I will probably make a custom connection UI that doesn't require users to deal with connection URLs at all... then perhaps I could automate the CREATE VIEW step, too.)

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

No branches or pull requests

2 participants