Custom jdbc connection with file uri uses Rapidminer program directory

MaartenKMaartenK MemberPosts:17Contributor II
I am trying to make a connection to a DuckDB using the DuckDB jdbc driver. In rapidminer i choose the driver manually (duckdb_jdbc-0.1.7.jar.
I then configure a manual URI: jdbc:duckdb:/duckdb/test_de.duckdb. This is a file URI.
Rapidminer does not take this as an absolute path but prefixes the RM program directory. When I click "test connection" I get this error:

IO Error: Cannot open file "C:\Program Files\RapidMiner\RapidMiner Studio\/duckdb/test_de.duckdb": Het systeem kan het opgegeven pad niet vinden.

How can I use this driver and pass an absolute path?

Tagged:

Best Answer

  • jwpfaujwpfau Employee, MemberPosts:247RM Engineering
    edited March 17 Solution Accepted
    The DuckDB JDBC Driver isn't in great shape, here is a hack to at least read some data from a DuckDB that gives you a "GetTypeInfo" error.

    It's not suitable for production, but might help to extract some data once.

                                              

    If you need to write, make sure to set the batch size to 0, since batch is also not implemented in this driver.

    Greetings,
    Jonas
    MaartenK

Answers

  • jwpfaujwpfau Employee, MemberPosts:247RM Engineering
    edited March 17
    Hi Maarten,

    Since you are using Windows you would have to use a Windows style file path i.e.
    jdbc:duckdb:C:\duckdb\test_de.duckdb

    Edit: I just tried the DuckDB JDBC Driver and it's missing some required functionality:

    https://github.com/duckdb/duckdb/issues/6759

    Greetings,
    Jonas
  • MaartenKMaartenK MemberPosts:17Contributor II
    I tried. It will give another error: GetTypeInfo with an exclamation mark. However, it also gives this error if I point to an non existing file name. But maybe the path issue is solverd and I ran into an other error.

Sign InorRegisterto comment.