gouline/dbt-metabase

Pass Metabase database ID when exporting models

eskrm opened this issue · 2 comments

Currently it seems the only way to pass a Metabase database is by display name. Example from README:

dbt-metabase models \
    --manifest-path target/manifest.json \
    --metabase-url https://metabase.example.com \
    --metabase-api-key mb_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX= \
    --metabase-database business \
    --include-schemas public

Can you also support passing the database by numeric ID? For motivation, we have a multi-tenant environment where databases have the same display name and are tracked by ID. Allowing one to pass the database ID makes it possible for the tool to distinguish between those databases.

Since there's no way to distinguish databases with identical names in the Metabase UI, this seems like a rare hacky use case. I'll wait to see if anyone else upvotes this issue before considering it.

Since there's no way to distinguish databases with identical names in the Metabase UI, this seems like a rare hacky use case. I'll wait to see if anyone else upvotes this issue before considering it.

The databases are managed programmatically by an admin user, and non-admin users are in groups that can only see one of the databases. But yeah, fair enough. Thanks.