Skip to content
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

Expose measures for metrics on MFEngine #735

Merged
merged 10 commits into from
Aug 29, 2023

Conversation

courtneyholcomb
Copy link
Contributor

@courtneyholcomb courtneyholcomb commented Aug 23, 2023

Resolves #SL-814

Description

Expose measures for metrics on MFEngine, ensuring that agg_time_dimension is populated even when it is inherited from the semantic model default.
We need to know the agg_time_dimension for a given measure so that the API can expose a list of all measures and the name of their agg_time_dimension for a given metric. This allows users to understand what metric_time actually represents for a given metric.

@cla-bot cla-bot bot added the cla:yes label Aug 23, 2023
@github-actions
Copy link

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Copy link
Contributor

@tlento tlento left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the typechecker override this all seems reasonable. I think it'll be more expedient to keep the change at the level of the engine and use the existing semantic_model_lookup methods to populate the additional fields you need.

Would you mind also updating the PR description with a little more context on why this change is being made? I'm assuming it's to support metadata lookups on the cloud side, but it's not clear to me how we're expecting this method to be used from the PR itself.

Thanks!

metricflow/model/semantics/semantic_model_lookup.py Outdated Show resolved Hide resolved
metricflow/model/semantics/semantic_model_lookup.py Outdated Show resolved Hide resolved
metricflow/test/api/test_metricflow_client.py Outdated Show resolved Hide resolved
@courtneyholcomb courtneyholcomb requested a review from tlento August 28, 2023 22:03
Copy link
Contributor

@tlento tlento left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your patience!

pyproject.toml Outdated Show resolved Hide resolved
@courtneyholcomb courtneyholcomb merged commit 30e9a02 into main Aug 29, 2023
8 checks passed
@courtneyholcomb courtneyholcomb deleted the court/measures-for-metrics branch August 29, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants