Metabase

Explore Postgres data, build dashboards and share reports with Metabase.

  • app
  • analytics
  • stack

Run it

briq run metabase

Fields

NameTypeOptionsDefault
imagestring—"metabase/metabase:v0.63.19.2"
envrecord{ key: string | { secret, value?, literal?, scope?, hosts?, locations? } }{}
cmdstring | string[]——
sizeenumsmall, medium"small"
filesrecord{ key: string | { base64 } }—
egressobject{ hosts }—

Outputs

Returned by briq_run once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.

METABASE_URL
http://metabase.<stack>.internal:3000
METABASE_ADMIN_EMAIL
admin@metabase.local
METABASE_ADMIN_PASSWORD
<METABASE_ADMIN_PASSWORD>
DATABASE_URL
postgres://postgres:<WAREHOUSE_PASSWORD>@postgres.<stack>.internal:5432/warehouse
READONLY_DATABASE_URL
postgres://reporter:<REPORTER_PASSWORD>@postgres.<stack>.internal:5432/warehouse

What it runs

BriqImagePortsSizeVolume
postgrespostgres:16-alpine5432nano10 GB at /var/lib/postgresql/data
metabasemetabase/metabase:v0.63.19.23000small—

When to use it

  • You want a BI tool with a visual editor: questions, filters and dashboards built by clicking.
  • The people reading the reports will also change them, without writing SQL.
  • You want dashboards on a Postgres warehouse.

Two briqs: metabase serves the dashboards, postgres is the warehouse it reads. On first boot Metabase makes its admin account (password in METABASE_ADMIN_PASSWORD) and connects the warehouse as Warehouse, read through a read-only role: nobody signed in to Metabase can change the data. For a dashboard written in SQL and shared from a link in under a minute, use duckdb.

Tips

  • Load from inside the warehouse: the image has wget, so wget -qO- <csv url> | psql -U postgres -d warehouse -c "\copy t from stdin with (format csv, header)" in briq_exec never sends the data through the agent.
  • Tables the agent creates as postgres in public are readable by Metabase. Another schema needs GRANT USAGE ON SCHEMA s TO reporter; GRANT SELECT ON ALL TABLES IN SCHEMA s TO reporter.
  • mb calls Metabase's API as the admin from briq_exec on the metabase briq: ["mb", "GET", "/api/database"]; ["mb", "POST", "/api/card", "-"] with the JSON as stdin.
  • Native SQL questions (dataset_query.type: "native") are the shortest way to a chart. After loading a new table, POST /api/database/<id>/sync_schema makes it browsable in the UI too.
  • Share one dashboard: POST /api/dashboard/<id>/public_link returns a uuid; the page is /public/dashboard/<uuid> on the briq's URL. Run with expose: "private" and keep the ?briq_token= on the link you send, so the link is the only way in.
  • First boot takes about three minutes while Metabase migrates its database: briq_run can answer while metabase is still creating; briq_status says when it runs. Later starts are faster, and the dashboards survive stops.
  • Our World in Data files: aggregate rows (World, continents, income groups) have an empty iso_code, not OWID_WRL. Match the world on country = 'World'; iso_code IS NOT NULL keeps the countries.

On this page

Free to try

Try briq, on us.

Every new account starts with €10 of credits. No card.

Start building

How can we help?

Message to the briq team