gouline / dbt-metabase

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

Assign Maturity or Tags to Exposures Based on Usage #43

Closed erika-e closed 9 months ago

erika-e commented 2 years ago

Adding this per suggestion from @z3z1ma from the dbt slack discussion 😄

This feature would be helpful for anyone with a large Metabase deployment - where adding exposures might add a lot of noise to the dbt project.

We could add functionality to assign maturity or tags based on total use, recent use, or some combination of those two. Tagging may be better as it's a bit more granular -- you could have things like tag:broken-exposure or tag:no-views-last-month and use that to find and clean up unused or lesser used exposures.

z3z1ma commented 2 years ago

Have been doing scouting on this issue. It seems Metabase hasn't exposed a lot of its sweet metadata via API outside of either stats, which are for anonymous usage tracking and only provide some high level context, and logs, which are very verbose and would need quite a bit of regex to churn out something probably not very meaningful. The most clear-cut solution is connection to Metabase's application database as suggested in another post. I guess the question is then, is that in the scope of this project? I think its extremely valuable having ran queries on my own application database for usage tracking, stats, and KPIs. User specific info on who is using what datasets is so valuable too. We can raise the issue in Metabase repo to better expose this data (might exist already), we can contribute some Clojure 😃, or develop a solution which may add a sqlalchemy dependency.

The bigger picture, I think, is improving the information flow into the dbt docs data catalogue utilizing Metabase as a metadata collection engine to inform data decisions/BI. Unpacking that statement might give us some more ideas or thoughts.