You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the results_metadata from executing the query are used (see below) and user-defined metadata is ignored. The result of this effort should be a unified path, preferably something like a middleware in metabase.query-processor.middleware.results-metadata that correctly unifies all of the result metadata in one location.
Currently, the results_metadata from executing the query are used
We need to ensure that existing result_metadata from cards (e.g. user curated model metadata) is retained and preferred to the computed metadata
A likely place to put this logic is in metabase.query-processor.middleware.results-metadata, but we need to be wary of record-and-return-metadata! as it can smash existing metadata. However, if we fixed it here, it would do the right thing everywhere.
An alternative location is in the rendering logic, but this isn't preferred as it's close to the leaves of the logic.
AC
Unit tests demonstrating the precedence of user-defined results_metadata over generated result_metadata in multiple card renders:
render/render-pulse-card :inline and :table as viz type, minimally
Note: Anything inside an <svg> tag comes from the js side of rendering. Anything happening in <html> happens on the Clojure side.
The text was updated successfully, but these errors were encountered:
There is actually an existing way to add in the metadata from a model but it isn't obvious from our dev.render-png ns. The inbound PR is very clear as to what cases need special handling (basically when you have a model with custom metadata) and how to use it.
Currently, the
results_metadata
from executing the query are used (see below) and user-defined metadata is ignored. The result of this effort should be a unified path, preferably something like a middleware inmetabase.query-processor.middleware.results-metadata
that correctly unifies all of the result metadata in one location.results_metadata
from executing the query are usedresult_metadata
from cards (e.g. user curated model metadata) is retained and preferred to the computed metadatametabase.query-processor.middleware.results-metadata
, but we need to be wary ofrecord-and-return-metadata!
as it can smash existing metadata. However, if we fixed it here, it would do the right thing everywhere.results_metadata
over generatedresult_metadata
in multiple card renders:render/render-pulse-card :inline
and:table
as viz type, minimally<svg>
tag comes from the js side of rendering. Anything happening in<html>
happens on the Clojure side.The text was updated successfully, but these errors were encountered: