Daba is a graphical database client built on top of Portal.
It aims to combine some of the convenience of traditional GUI clients with the extensibility and power of REPL-based workflows. Start with initial exploration of database schema and data visually, then manipulate results further programmatically via REPL.
Explore schema | Query and visualize |
---|---|
Watch the demo video:
clojure -Sdeps '{:deps{io.github.dundalek/daba{:git/tag"v0.2.0":git/sha"b3c2e5e9"}}}' \
-X daba.api/open
clojure -Ttools install io.github.dundalek/daba '{:git/tag"v0.2.0"}' :as daba
Then run:
clojure -Tdaba open
~/.clojure/deps.edn
to :aliases
section
{:aliases
{:daba
{:extra-deps {io.github.dundalek/daba {:git/tag "v0.2.0" :git/sha "b3c2e5e9"}}
:exec-fn daba.api/open}}}
Then run:
clojure -X:daba
Using this way one can also include additional JDBC drivers.
- Connect
- Connect to datasource
- Use URI string or db-spec map
- Use Datasource Input viewer for string or map
- Connect to datasource
- Explore
- List databases for datasource
- List tables for database
- List columns for table
- Data grid with pagination for table data
- Query
- Execute SQL query
- Use Query Editor viewer for string
- Other
- Remove individual cards using X button
- Useful for rapid exploration of tables
- Get results as value in REPL by dereferencing Portal instance
- Visualize data using Portal's builtin
vega-lite
viewer - Portal filtering works when selecting list of schemas, tables, columns
- Remove individual cards using X button
SQL
- PostgreSQL
- SQLite
- DuckDB
- XTDB2 (using Postgres driver)
- H2
- ...
- And likely other databases that provide a JDBC driver.
Datomic
- To connect specify arg map like for
d/client
in the datasource input (example):{:server-type :datomic-local :system "datomic-samples" :storage-dir "path/to/storage")}
XTDB1
- To connect specify configuration map like for
xt-start-node
in the datasource input (example):{:xtdb/tx-log ... :xtdb/document-store ... :xtdb/index-store ...}
See API.md and example/user.clj which includes examples using the API from REPL.