Metabase

Overview

The Metabase connector allows Zenskar to integrate directly with your Metabase instance and sync data for analytics and reporting. By connecting Metabase as a data source, Zenskar can automatically retrieve datasets, dashboards, and query results used in your business intelligence workflows.


Would you like it tailored more toward Zenskar analytics usage (for example, “to populate dashboards and metrics in Zenskar’s Analytics module”)?

Prerequisites

To connect Metabase as a data source in Zenskar, ensure the following:

Authentication

To set up a Metabase data source connector in Zenskar, you need:

  • Username and password: Used to generate a new session token

  • Session token: A token used to authenticate API requests (typically expires every 14 days)

📑

If you provide only username and password, Zenskar will generate a session token automatically when running queries. This may trigger security notifications in the user's Metabase account.

Metabase API URL

  • The URL of your Metabase instance API (must use https://)
  • Example: https://your-metabase-domain.com/api/

Obtain a session token (optional)

You can manually generate a session token using Metabase’s API:

curl -X POST \
-H "Content-Type: application/json" \
-d '{"username": "[email protected]", "password": "fakepassword"}' \
https://your-metabase-domain.com/api/session

The response includes an id field — this is your session_token:

{"id":"38f4939c-ad7f-4cbe-ae54-30946daf8593"}
🚧

Session tokens expire (14 days by default). Update it in Zenskar when expired or configure your Metabase server’s MAX_SESSION_AGE environment variable to extend the session duration.

❗️

The connector will alert you of an invalid or expired session token by returning a 401 Unauthorized response status code.


Set up a Metabase data-source connector via Zenskar dashboard

Once the prerequisites are complete, connect Metabase as a data source in Zenskar.

  1. Log into your Zenskar dashboard.
  2. In the left side bar, click Usage > Data Sources.
  3. In the top-right corner, click + ADD DATA SOURCE.
  4. On the Add New Data Source page, configure the connector.
  5. Click on the SAVE SOURCE button

Configure the connector

General details

FieldDescriptionRequired
Source NameEnter a unique name for this data source.Yes
Source TypeSelect Metabase from the dropdown menu.Yes

Connector configuration

FieldDescriptionRequired
Metabase instance API URLURL to your Metabase instance API. Must start with https://. Example: "https://localhost:3000/api/"Yes
UsernameUsername for authenticating with MetabaseYes
PasswordPassword for authenticating with MetabaseYes
Session tokenSession token for Metabase authenticationYes

Data source access mode (read-only)

Zenskar replicates data directly from the source to Zenskar’s data infrastructure. The data is periodically synced to maintain freshness. This option is:

  • Ideal for small-mid size database (less than 30GB)
  • Ideal for periodical data ingestion
  • Optimised for quicker invoice generation

Addendum

Supported streams

Refer to the Metabase API reference.

StreamDescription
CardExport cards (questions) from Metabase
CollectionsExport collection metadata
DashboardExport dashboards and metadata
UserExport user information
DatabasesExport database metadata
Native Query SnippetExport SQL snippets saved in Metabase