gouline / dbt-metabase

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

Model meta metabase.display_name not parsed #129

Closed willbryant closed 1 year ago

willbryant commented 1 year ago

The export_model function supports setting the display name for models from a display_name property on MetabaseModel.

However, this isn't accessible, as the meta: metabase.display_name property is not parsed and populated in the construction of the MetabaseModel in _read_model.

willbryant commented 1 year ago

Wait, you added it in August. So why isn't it working, hmm.

willbryant commented 1 year ago

Ah no, it's only in dbt_folder.py, the equivalent code is missing from dbt_manifest.py.

gouline commented 1 year ago

Sounds like you already found the fix, happy to raise a PR?

willbryant commented 1 year ago

There ya go :)

willbryant commented 1 year ago

Actually, would a better fix be to add display_name to METABASE_META_FIELDS?

At the moment display_name doesn't work for columns, for sort of similar reasons. If I add display_name there, I believe it will fix columns, but it also makes the explicit code for display_name unnecessary?

willbryant commented 1 year ago

Yeah, that seems to work better, update the PR.