New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MLv2: Simplify MetadataProvider protocols (16 methods/3 protocols => 7 methods/2 protocols) #42070
Conversation
|
@@ -256,6 +268,10 @@ | |||
[:description {:optional true} [:maybe ::lib.schema.common/non-blank-string]]]) | |||
|
|||
(mr/def ::legacy-metric | |||
"Malli schema for a legacy v1 [[metabase.models.legacy-metric]], but with kebab-case keys. A Metric defines an MBQL | |||
snippet with an aggregation and optionally a filter clause. You can add a `:metric` reference to the `:aggregations` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should that be :legacy-metric
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's talking about :metric
clauses which are still called :metric
AFAIK even if they are V1 metrics
@camsaul Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone? |
MetadataProvider
andBulkMetadataProvider
protocols into 5 methods in a single protocol -- instead of separate methods to fetch a Field/Card/Table/LegacyMetric/Segment as well as a bulk method, just have the metadata providers implement only the bulk method and add helper functions for fetching single objects of different typescached-database
andstore-database!
methods from theCachedMetadataProvider
protocollib.metadata/LegacyMetricMetadata
to the schema keywords e.g.::lib.schema.metadata/legacy-metric