-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[CT-2526] Add ability to automatically create metrics from semantic model measures #8310
Merged
QMalcolm
merged 8 commits into
main
from
ct-2526--support-create-metric-measure-property
Aug 14, 2023
Merged
[CT-2526] Add ability to automatically create metrics from semantic model measures #8310
QMalcolm
merged 8 commits into
main
from
ct-2526--support-create-metric-measure-property
Aug 14, 2023
Conversation
This file contains 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
QMalcolm
changed the title
Ct 2526 support create metric measure property
[CT-2526] Add ability to automatically create metrics from semantic model measures
Aug 3, 2023
Codecov Report
@@ Coverage Diff @@
## main #8310 +/- ##
==========================================
- Coverage 86.28% 86.23% -0.05%
==========================================
Files 174 174
Lines 25518 25536 +18
==========================================
+ Hits 22017 22020 +3
- Misses 3501 3516 +15
|
QMalcolm
force-pushed
the
ct-2526--support-create-metric-measure-property
branch
from
August 3, 2023 21:54
8459820
to
233cb44
Compare
QMalcolm
force-pushed
the
ct-2526--support-create-metric-measure-property
branch
from
August 3, 2023 22:19
233cb44
to
6c45e3b
Compare
QMalcolm
added
semantic
Issues related to the semantic layer
and removed
Skip Changelog
Skips GHA to check for changelog file
labels
Aug 3, 2023
QMalcolm
force-pushed
the
ct-2526--support-create-metric-measure-property
branch
from
August 4, 2023 18:19
6c45e3b
to
c3a6671
Compare
QMalcolm
force-pushed
the
ct-2526--support-create-metric-measure-property
branch
from
August 4, 2023 18:20
c3a6671
to
4ff857f
Compare
I was doing a demo earlier today of this branch (minus this commit) and noticed something odd. When I changes a semantic model, metrics that should have been technically uneffected would get dropped. Basically if I made a change to a semantic model which had metrics in the same file, and then ran parse, those metrics defined in the same file would get dropped. Then with no other changes, if I ran parse again they would come back. What was happening was that parsed metrics and generated metrics were getting tracked the same way on the file objects for partial parsing. In 0787a7c we began dropping all metrics tracked in a file objects when changes to semantic models were detected. Since parsed metrics and generated metrics were being tracked together on the file object, the parsed metrics were getting dropped as well. In this commit we begin separating out the tracking of generated metrics and parsed metrics on the file object, and now only drop the generated metrics when semantic models have a detected change.
QMalcolm
force-pushed
the
ct-2526--support-create-metric-measure-property
branch
from
August 4, 2023 21:07
a86b875
to
f821b1c
Compare
gshank
approved these changes
Aug 14, 2023
Opened a new issue in dbt-labs/docs.getdbt.com: dbt-labs/docs.getdbt.com#4127 |
5 tasks
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.
resolves #7504
Problem
Many metrics are just simple metrics defined directly off measures. This work could be easily automated by adding a property to measures that indicates a simple metric should be created
Solution
The first step is to simply create a metric when
create_metric: true
is specified. If acreate_metric
value isn't specified in the raw measure, thencreate_metric
will default toFalse
. There are also a number of implications with partial parsing.Checklist