AlexR2D2 / metabase_duckdb_driver

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

Unable to compile the driver for DuckDB 0.9.2 over Metabase 0.48.7 #26

Open vgrimaldi848 opened 4 months ago

vgrimaldi848 commented 4 months ago

Hi @AlexR2D2,

I'm trying to compile the driver without success for the release 0.9.2. This is quite important if you want to test the integration between Metabase and the DuckDB cloud based platform Motherduck.

Is there any possibility for you to add a section in the documentation to explain how to compile the driver with the latest 0.48.7 release of Metabase?

I'm trying using a WSL Ubuntu image and seems like Clojure is not able to pick up the project files.

This is the error i got when running:

clojure -X:build:drivers: :driver :duckdb

{:clojure.main/message
 "Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).\n-X:build:drivers: (No such file or directory)\n",
 :clojure.main/triage
 {:clojure.error/class java.io.FileNotFoundException,
  :clojure.error/line -2,
  :clojure.error/cause "-X:build:drivers: (No such file or directory)",
  :clojure.error/symbol java.io.FileInputStream/open0,
  :clojure.error/source "FileInputStream.java",
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type java.io.FileNotFoundException,
    :message "-X:build:drivers: (No such file or directory)",
    :at [java.io.FileInputStream open0 "FileInputStream.java" -2]}],
  :trace
  [[java.io.FileInputStream open0 "FileInputStream.java" -2]
   [java.io.FileInputStream open "FileInputStream.java" 219]
   [java.io.FileInputStream <init> "FileInputStream.java" 157]
   [java.io.FileInputStream <init> "FileInputStream.java" 112]
   [clojure.lang.Compiler loadFile "Compiler.java" 7575]
   [clojure.main$load_script invokeStatic "main.clj" 475]
   [clojure.main$script_opt invokeStatic "main.clj" 535]
   [clojure.main$script_opt invoke "main.clj" 530]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.main main "main.java" 40]],
  :cause "-X:build:drivers: (No such file or directory)"}}

Thanks for the great work and long live the Ducks!

armgong commented 4 months ago

for compiling , the simplest way is : 1 git clone source code to metabase module/drivers/ duckdb 2 edit deps.edn add duckdb
3 bin/build-drivers.sh duckdb for honeysql2 (not sure if it needed by metabase 0.48, mine is 0.49) try my patch https://github.com/AlexR2D2/metabase_duckdb_driver/pull/25

AlexR2D2 commented 4 months ago

Added the section How to build the DuckDB .jar plugin yourself at the end of the main page