Semantic Layer Sync with Metabase
This page details the support for Metabase (opens in a new tab) in Semantic Layer Sync.
Semantic Layer Sync works with managed and self-hosted Metabase instances.
Configuration
To create a new sync, choose Metabase:
Data model is synchronized via Metabase API (opens in a new tab) which uses a user
name and a password
for authentication. You can use your own user name and
password or create a new service account. You can copy a url
at any page of
your Metabase workspace.
Example confguration for Metabase:
Python
JavaScript
from cube import config
@config('semantic_layer_sync')
def semantic_layer_sync(ctx: dict) -> list[dict]:
return [
{
'type': 'metabase',
'name': 'Metabase Sync',
'config': {
'user': 'mail@example.com',
'password': '4dceae-606a03-93ae6dc7',
'url': 'example.metabaseapp.com',
'database': 'Cube Cloud: production-deployment'
}
}
]
When a sync is run, Metabase will send an email with a new login notification. You can ignore such emails, configure Metabase (opens in a new tab) to skip sending them, or use a service account with a different email address: