The Metabase CrateDB driver allows Metabase v0.32.0 or above to connect to CrateDB databases. Instructions for installing it can be found below.
This driver is community-supported and is not considered part of the core Metabase project. If you would like to open a GitHub issue to report a bug or request new features, or would like to open a pull requests against it, please do so in this repository, and not in the core Metabase GitHub repository.
We will close issues or PRs concerning the Crate driver opened in the core Metabase GitHub repository, and ask you to reopen them here.
Click here to view the latest release of the Metabase CrateDB driver; click the link to download crate.metabase-driver.jar
.
You can find past releases of the CrateDB driver here.
Metabase will automatically make the Crate driver if it finds the driver JAR in the Metabase plugins directory when it starts up. All you need to do is create the directory (if it's not already there), move the JAR you just downloaded into it, and restart Metabase.
By default, the plugins directory is called plugins
, and lives in the same directory as the Metabase JAR.
For example, if you're running Metabase from a directory called /app/
, you should move the Crate driver JAR to /app/plugins/
:
# example directory structure for running Metabase with Vertica support
/app/metabase.jar
/app/plugins/crate.metabase-driver.jar
If you're running Metabase from the Mac App, the plugins directory defaults to ~/Library/Application Support/Metabase/Plugins/
:
# example directory structure for running Metabase Mac App with Vertica support
/Users/camsaul/Library/Application Support/Metabase/Plugins/crate.metabase-driver.jar
If you are running the Docker image or you want to use another directory for plugins, you should specify a custom plugins directory by setting the environment variable MB_PLUGINS_DIR
.
-
Setup a connection by providing a Name and a Host. CrateDB supports having a connection pool of multiple hosts. This can be achieved by providing a comma-separated list of multiple
<host>:<psql-port>
pairs.host1.example.com:5432,host2.example.com:5432
-
Click the
Save
button. Done.
Metabase will now begin inspecting your CrateDB Dataset and finding any tables and fields to build up a sense for the schema. Give it a little bit of time to do its work and then you're all set to start querying.
- Columns/Fields of type
object_array
are deactivated and not exposed. However, their nested fields are listed and also supported for queries.
cd /path/to/metabase/source
lein install-for-building-drivers
cd /path/to/crate-driver
lein clean
DEBUG=1 LEIN_SNAPSHOTS_IN_RELEASE=true lein uberjar
This will build a file called target/uberjar/crate.metabase-driver.jar
; copy this to your Metabase ./plugins
directory.
Copyright © 2019 Metabase, Inc.
Distributed under the Eclipse Public License, same as Clojure.
crate-driver's People
crate-driver's Issues
there does not seem to be SHA hashes posted for the crate-driver (for metabase)
there does not seem to be SHA hashes posted for the crate-driver (for metabase)
would it be possible, to do this, just as the metabase.jar releases have posted SHA hashes?
Create Database Error
OSX, Crate 4.0.3
Metabase 0.33.0.0
When pressing SAVE button in Add Database page throws error :
No method in multimethod 'connection-details->spec' for dispatch value: :crate
I can connect to crate if using database type Postgres, but metabase can not browse the table data.
My question: How to specify user and password?
Failed connection to crate db with user/password
Hi,
My Metabase 0.34.3 is running on a AWS EC2 and my Crate 4.1.2 is running on another AWS EC2 instance.
I do not access to Crate through the default credentials (user: "crate"
/ password: none
) but with custom credentials.
The metabase/crate-driver
doesn't allow custom credentials connection.
As I didn't know how to add user/password fields in metabase front, I am posting here the unsecured solution we found :
In the file /crate-driver/src/metabase/driver/crate.clj
, we updated rows 203-206
{:classname "io.crate.client.jdbc.CrateDriver"
:subprotocol "crate"
:subname (str "//" hosts)
:user "crate"}
with our custom credentials :
{:classname "io.crate.client.jdbc.CrateDriver"
:subprotocol "crate"
:subname (str "//" hosts)
:user "<your_username>"
:password "<your_password>"}
Now it perfectly works !
If you have a better option, I am happy to hear it :-)
Connection Failed Metabase v0.38.2 using crate-metabase-driver.jar
I am trying to connect my locally hosted metabase to locally hosted cratedb on Ubunti 20.04.
I have copied the driver (crate.metabase-driver.jar) under the plugins folder of metabase.
Going by the option in metabase: admin -> databases -> add database option, drop down shows cratedb option.
I give the database a name and use default setting localhost:5432/; on pressing save it turns red "Failed". I tried changing to localhost:4200/ also yielded same result.
Will be great if I can get some help
thanks!
Error when filter and grouping by datetime field
I'm using
- https://github.com/metabase/crate-driver/releases/download/1.0.0-crate-jdbc-2.3.0/crate.metabase-driver.jar
- running Metabase 0.32.0-snapshot
My Aggregation by Time Create
Error : No method in multimethod 'date' for dispatch value: [:crate :day]
Errol log
02-08 13:57:12 ?[1mWARN metabase.query-processor?[0m :: Query failure: No method in multimethod 'date' for dispatch value: [:crate :day] ("--> query_processor$assert_query_status_successful.invokeStatic(query_processor.clj:286)" "query_processor$assert_query_status_successful.invoke(query_processor.clj:278)" "query_processor$run_and_save_query_BANG_.invokeStatic(query_processor.clj:324)" "query_processor$run_and_save_query_BANG_.invoke(query_processor.clj:317)" "query_processor$fn__39788$process_query_and_save_execution_BANG___39793$fn__39794.invoke(query_processor.clj:355)" "query_processor$fn__39788$process_query_and_save_execution_BANG___39793.invoke(query_processor.clj:341)" "query_processor$fn__39814$process_query_and_save_with_max_BANG___39819$fn__39820.invoke(query_processor.clj:387)" "query_processor$fn__39814$process_query_and_save_with_max_BANG___39819.invoke(query_processor.clj:382)" "api.dataset$fn__43558$fn__43561.invoke(dataset.clj:45)" "api.common$fn__24629$invoke_thunk_with_keepalive__24634$fn__24635$fn__24636.invoke(common.clj:435)")
Got Error when add crateDB :valid false, :dbname
Using : Metabase 0.33.0-preview2
Driver Crate : https://github.com/metabase/crate-driver/releases/download/1.0.1-crate-jdbc-2.3.0/crate.metabase-driver.jar
Got Error :
08-06 15:31:47 DEBUG middleware.log :: POST /api/database 400 2 ms (0 DB calls) {:valid false, :dbname "No method in multimethod 'connection-details->spec' for dispatch value: :crate", :message "No method in multimethod 'connection-details->spec' for dispatch value: :crate"}
do not support with metabase Metabase 0.32.9
{"message":"No method in multimethod 'connection-properties' for dispatch value: :crate","type":"class java.lang.IllegalArgumentException","stacktrace":["clojure.lang.MultiFn.getFn(MultiFn.java:156)","clojure.lang.MultiFn.invoke(MultiFn.java:229)","--> driver.util$available_drivers_info$iter__24018__24022$fn__24023.invoke(util.clj:114)","driver.util$available_drivers_info.invokeStatic(util.clj:112)","driver.util$available_drivers_info.invoke(util.clj:108)","public_settings$public_settings.invokeStatic(public_settings.clj:211)","public_settings$public_settings.invoke(public_settings.clj:197)","routes.index$load_entrypoint_template.invokeStatic(index.clj:68)","routes.index$load_entrypoint_template.invoke(index.clj:65)","routes.index$entrypoint.invokeStatic(index.clj:82)","routes.index$entrypoint.invoke(index.clj:77)","middleware.exceptions$catch_uncaught_exceptions$fn__73023.invoke(exceptions.clj:104)","middleware.exceptions$catch_api_exceptions$fn__73020.invoke(exceptions.clj:92)","middleware.log$log_api_call$fn__73472.invoke(log.clj:162)","middleware.security$add_security_headers$fn__72978.invoke(security.clj:105)","middleware.json$wrap_json_body$fn__73259.invoke(json.clj:63)","middleware.json$wrap_streamed_json_response$fn__73277.invoke(json.clj:97)","middleware.session$bind_current_user$fn__71350$fn__71351.invoke(session.clj:193)","middleware.session$do_with_current_user.invokeStatic(session.clj:177)","middleware.session$do_with_current_user.invoke(session.clj:170)","middleware.session$bind_current_user$fn__71350.invoke(session.clj:192)","middleware.session$wrap_current_user_id$fn__71335.invoke(session.clj:161)","middleware.session$wrap_session_id$fn__71320.invoke(session.clj:123)","middleware.auth$wrap_api_key$fn__72918.invoke(auth.clj:27)","middleware.misc$maybe_set_site_url$fn__73553.invoke(misc.clj:58)","middleware.misc$bind_user_locale$fn__73556.invoke(misc.clj:74)","middleware.misc$add_content_type$fn__73541.invoke(misc.clj:30)","middleware.misc$disable_streaming_buffering$fn__73578.invoke(misc.clj:119)","middleware.misc$wrap_gzip$fn__73571.invoke(misc.clj:101)"]}
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.