feat(gooddata-sdk): [AUTO] add MetricDefinitionOverride wrapper for GDAI-1389#1442
Closed
yenkins-admin wants to merge 1 commit intomasterfrom
Closed
feat(gooddata-sdk): [AUTO] add MetricDefinitionOverride wrapper for GDAI-1389#1442yenkins-admin wants to merge 1 commit intomasterfrom
yenkins-admin wants to merge 1 commit intomasterfrom
Conversation
…DAI-1389 Adds MetricDefinitionOverride wrapper class to expose the measureDefinitionOverrides field added to the AFM model in PR #20609. Includes ExecutionDefinition parameter, compute_model_to_api_model() forwarding, public export, and unit tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1442 +/- ##
==========================================
+ Coverage 77.24% 77.27% +0.02%
==========================================
Files 227 227
Lines 14672 14689 +17
==========================================
+ Hits 11334 11351 +17
Misses 3338 3338 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
MetricDefinitionOverridewrapper class andmeasure_definition_overridessupport toExecutionDefinitionin the gooddata-sdk compute model.Problem ID: P013 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/23194184862
What changed in gdc-nas
measureDefinitionOverridesfield (array ofMetricDefinitionOverride) to the AFM model across afm-exec-api, automation, export-controller, and metadata-api OpenAPI specs. NewMetricDefinitionOverrideschema with requireddefinition(InlineMeasureDefinition) anditem(AfmObjectIdentifierCore) fields, enabling per-request override of catalog metric MAQL definitions without modifying stored definitions.WhatIfScenarioConfig,WhatIfScenarioItem, andWhatIfMeasureAdjustmentConfigschemas in the afm-exec-api OpenAPI spec. Also removes several LLM provider config schemas from that spec.What was implemented in SDK
MetricDefinitionOverridewrapper class using@define(attrs) withitem: ObjIdandmaql: strfields, plusas_api_model()serialization methodExecutionDefinition.__init__()with optionalmeasure_definition_overrides: list[MetricDefinitionOverride] | None = Noneparametercompute_model_to_api_model()to conditionally forwardmeasure_definition_overridestomodels.AFMMetricDefinitionOverridefromgooddata_sdk.__init__.pyas part of the public APItest_compute_model.pyverifying serialization correctness and absence of the field when not providedFiles modified
packages/gooddata-sdk/src/gooddata_sdk/compute/model/execution.pypackages/gooddata-sdk/src/gooddata_sdk/__init__.pypackages/gooddata-sdk/tests/compute_model/test_compute_model.pyJIRA: PENDING (Jira ticket will be created after review)
Risk: Low