This connector extracts technical metadata from Metabase using Metabase API.
In order to fetch dashboards, charts and lineage information, an Administrator user and credential is needed. We recommend creating a dedicated Metabase user and role for the connector to use. The reason we need Administrator permission is to read the database details, so we can link charts to upstream dataset entities in Metaphor. Without Administrator permission, the connector can still be run and fetch dashboards and charts, without upstream lineage information.
To create a new Metabase user:
- Log into Metabase as an Administrator.
- Go to
People
tab, clickCreate Users
, fill out the name and email, and chooseAdmin
group. An email should be sent to the user. - Follow the URL link in the email to activate user and password, and login to metabase.
Create a YAML config file based on the following template.
server_url: <metabase_server_url> // e.g. "https://xxx.metabaseapp.com" for Metabase Cloud
username: <username>
password: <password>
Metabase's API does not provide information on the default schema used to execute native queries. This makes it difficult to parse the lineage precisely. When this happens, use database_defaults
to manually set the database's default schema:
database_defaults:
- id: <id of the database in Metabase>
default_schema: <default schema for the database>
See Output Config for more information.
You can specify the directories (collection paths) to be included / excluded by the connector. By default all assets are included.
To specify the directories to include / exclude, use the following field:
filter:
includes:
- top_level_directory
- directory/sub_directory
...
excludes:
- top_level_directory2
- directory/sub_directory2/sub_sub_dir
...
To only include specific paths, use includes
field. To only exclude certain paths, use excludes
field.
Follow the Installation instructions to install metaphor-connectors
in your environment (or virtualenv). Make sure to include either all
or metabase
extra.
Run the following command to test the connector locally:
metaphor metabase <config_file>
Manually verify the output after the command finishes.