MotherDuck-Open-Source / metabase_duckdb_driver

Metabase DuckDB Driver shipped as 3rd party plugin
Apache License 2.0
45 stars 5 forks source link

DuckDB v0.10.2: Error when creating DuckDB connection #6

Closed abhishek-jn closed 3 months ago

abhishek-jn commented 4 months ago

I have deployed a Docker instance of Metabase alongside DuckDB driver. Have used the template given in the documentation and tweaked it to use the latest metabase.jar and the latest duckb.metabase-driver.jar file for creating the custom docker image. When I deploy the stack with DuckDB v 0.10.2, I get the following error related to MotherDuck token with error message: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null

image

When cross-checking from the change logs, it confirms the MotherDuck token is not a required field. Pasting any random value is also not working. When I reproduce the same, but with the duckdb.metabase-driver.jar with DuckDB v0.10.0. I am able to successfully establish the connection and use Metabase along with DuckDB drivers.

metabase.jar: https://downloads.metabase.com/v0.49.13/metabase.jar

Dockerfile for building custom image

FROM openjdk:19-buster

ENV MB_PLUGINS_DIR=/home/plugins/

COPY ./metabase.jar /home/
COPY ./duckdb.metabase-driver.jar /home/plugins/

RUN chmod 744 /home/plugins/duckdb.metabase-driver.jar

CMD ["java", "-jar", "/home/metabase.jar"]

Edit: Replaced site redirect with direct download link for metabase.jar

abhishek-jn commented 4 months ago

duckdb.metabase-driver.jar (v0.10.0): https://github.com/AlexR2D2/metabase_duckdb_driver/releases/tag/0.2.6

hrl20 commented 3 months ago

is your use case to open an in-memory duckdb? If so can you try setting the Database File field to:memory:? I'll add some handling for the empty string case.

abhishek-jn commented 3 months ago

Yes, my use case is querying parquet files stored on server/S3 by using an in-memory duckdb on metabase. Setting the field to :memory: works. Thanks. Maybe just updating the placeholder for info /home/you/the.duckdb (or empty for 'in memory' mode) to /home/you/the.duckdb (or :memory: for 'in memory' ) should do it.