Skip to main content
Version: Preview

Metabase

Experimental
Creates:
AssetsLineage

Configure in the UI

This plugin can be configured directly in the Marmot UI with a step-by-step wizard.

View Guide

The Metabase plugin discovers dashboards, questions, metrics and models from a Metabase instance through its REST API, and links them to the warehouse tables they read.

Dashboards become Dashboard assets, questions and metrics become Chart assets, and models become Data Model Object assets. Each is named by the path of the collection holding it and its own name, for example Marketing/Weekly/Signups by channel; items in the root collection keep their bare name. Native SQL cards carry their query, and every asset links back to Metabase.

Lineage

Every dashboard is linked to the cards placed on it. Each card is linked to the tables it reads: query builder cards name their source table and joins, and native SQL cards are scanned for the tables after FROM and JOIN, matched against the tables Metabase has synced for the card's database. Those tables also feed every dashboard showing the card, and a card built on a model or another question is linked to it.

Tables are addressed as the warehouse's own Marmot plugin addresses them, for example mrn://table/postgresql/orders for a Postgres table, so the edges land on the assets that plugin creates. This plugin creates no table assets; run the warehouse plugin as well to see the full graph.

Authentication

Create an API key in Metabase under Settings, Authentication, API keys (Metabase 0.49 and newer) and set it as api_key. Without an API key the plugin logs in with username and password.

Example Configuration


host: "https://metabase.example.com"
api_key: "${METABASE_API_KEY}"
include_charts: true
include_models: true
discover_lineage: true
include_archived: false
filter:
include:
- "^Marketing/.*"
exclude:
- ".*/Scratch/.*"
tags:
- "metabase"
- "bi"

Configuration

The following configuration options are available:

PropertyTypeRequiredDescription
api_keystringfalseAPI key (Metabase 0.49 and newer)
discover_lineageboolfalseLink cards to the tables and models they read
external_links[]ExternalLinkfalseExternal links to show on all assets
filterFilterfalseFilter discovered assets by name (regex)
hoststringtrueMetabase URL, for example https://metabase.example.com
include_archivedboolfalseInclude archived dashboards and cards
include_chartsboolfalseDiscover questions and metrics as Chart assets
include_modelsboolfalseDiscover models as Data Model Object assets
passwordstringfalsePassword for session login
tagsTagsConfigfalseTags to apply to discovered assets
usernamestringfalseUsername for session login, used when no API key is set
verify_sslboolfalseVerify the server's TLS certificate

Available Metadata

The following metadata fields are available:

FieldTypeDescription
archivedboolWhether the dashboard or card is archived
card_countintNumber of cards placed on the dashboard
card_typestringCard kind: question, metric or model
chart_typestringNormalised chart type (Table, Bar, Line, Pie, Area, Scatter, Map, Gauge, Text, Other)
collectionstringPath of the collection holding the dashboard or card
collection_idintId of the collection holding the dashboard or card
created_atstringCreation timestamp
creator_idintId of the user who created the dashboard or card
databasestringName of the Metabase database the card queries
database_idintId of the Metabase database the card queries
displaystringMetabase visualisation, for example bar or scalar
idintDashboard or card id in Metabase
query_typestringWhether the card runs SQL (native) or the query builder (query)
table_idintId of the card's source table, for query builder cards
updated_atstringLast update timestamp
urlstringLink to the dashboard or card in Metabase