Hello,
This is a feature request to allow for this:
- Models and Dashboards begin to share some qualities of a Collection. That is, they can "hold" SQL-Queries and/or Questions.
- It would be nice if "held" SQL-Queries and/or Questions were scoped to the "holder". Meaning, the parent Models and Dashboards can reference the held Queries / Questions for which they are a parent of. However, attempt to reference from a Model / Dashboard that isn't holding the Queries / Questions should fail with an error.
Why: This pattern is already superficially implemented by users in many cases, though without support from the Metabase application to enforce the scope. Consider the following file structure in Metabase:
dashboards/
-|- dash_1/
-|-|- dash_1 *(dashboard)*
-|-|- dash_1_queries/
-|-|-|- table_1
-|-|-|- table_2
-|-|-|- ...
As seen above, the dashboard has some dashboard specific Questions / Queries.
This pattern naturally emerges because Models are often designed as a generally applicable dataset, meaning it gets used by many different dashboards. Therefore, there is reason to create a tailored version of a Model for each Dashboard its dataset should become part of.
The current solution is to do exactly that, create dashboard specific Questions and Queries. However, this solution is insufficient for a number of reasons:
- It does not limit scope of the "held" Questions and Queries, meaning search results are often muddled and difficult to look through. Consider that these Questions and Queries are often different versions of the same model, suggesting they may end up having similar names.
- It requires the user create their own organization scheme to handle this pattern. The result is often less scalable than if the application helped out.
- Any accepted organization scheme increase complexity of the file structure, as it's now muddled with directories that serve very little value globally. Consider: Users may only want to see "dashboard_queries/" for "dash_1" when that is explicitly what they want to see / troubleshoot. Not all the time whenever they are navigating Metabase.
One possible implementation would be to have a new "Private Collection" that gets associated with individual Models and/or Dashboards. Such as:
With the implementation being a "Private Collection" of sorts, it would allow users to easily move objects in and out of the collection. This sounds advantageous. Please let me know your thoughts.