gouline / dbt-metabase

dbt + Metabase integration
https://pypi.org/project/dbt-metabase/
MIT License
442 stars 63 forks source link

Exposures YAML name file replaces spaces with underscores #91

Closed KenxinKun closed 2 years ago

KenxinKun commented 2 years ago

We've just started using dbt-metabase exposures and I've noticed that the output YAML replaces all spaces in the Metabase card names with underscores (e.g. a card with name "Votes by country" becomes "Votes_by_country"). This makes it a bit difficult to read when published in the docs since we wouldn't have expected that title/name to be edited in the process. Is there an option to avoid this?

KenxinKun commented 2 years ago

Just as extra info, I double checked the prod API endpoint for the card I noticed this on and the JSON response has spaces, not underscores.

z3z1ma commented 2 years ago

@KenxinKun

This is required. It is a limitation of dbt docs. The docs site will not render exposures in the graph if the name has spaces. So the replacement of spaces with underscores is purposeful for visual lineage preservation in the docs site.

z3z1ma commented 2 years ago

Here is a reference to an issue which mentions it as well:

https://github.com/dbt-labs/dbt-docs/issues/168

KenxinKun commented 2 years ago

oooh fair point! I see from the link that it will get addressed at some point, so not sure if best to close this issue or leave it on the backburner to watch the upstream dbt repo?

gouline commented 2 years ago

Closing since nothing can be done now. When/if anything changes, reopen it with new information.