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

Semantic model configs - enable/disable + groups #8502

Merged
merged 20 commits into from
Aug 31, 2023
Merged

Conversation

emmyoop
Copy link
Member

@emmyoop emmyoop commented Aug 28, 2023

resolves #7968
docs

Problem

Semantic models cannot be enabled/disabled and also cannot belong to groups.

Solution

Enable configs to allow semantic models to be disabled and be in groups.
When a semantic model is disabled but the defined metric for the measure is not, it throws a ParsingError.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@cla-bot cla-bot bot added the cla:yes label Aug 28, 2023
@emmyoop emmyoop changed the title Er/ct 2751 enable sm Semantic model configs - enable/disable + groups Aug 28, 2023
@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02% 🎉

Comparison is base (72898c7) 86.34% compared to head (a036fcd) 86.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8502      +/-   ##
==========================================
+ Coverage   86.34%   86.36%   +0.02%     
==========================================
  Files         174      174              
  Lines       25541    25579      +38     
==========================================
+ Hits        22054    22092      +38     
  Misses       3487     3487              
Flag Coverage Δ
integration 83.16% <100.00%> (+0.01%) ⬆️
unit 65.03% <25.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
core/dbt/config/runtime.py 96.23% <ø> (ø)
core/dbt/config/project.py 97.37% <100.00%> (+0.01%) ⬆️
core/dbt/context/context_config.py 94.24% <100.00%> (+0.12%) ⬆️
core/dbt/contracts/graph/manifest.py 93.84% <100.00%> (+0.07%) ⬆️
core/dbt/contracts/graph/model_config.py 92.11% <100.00%> (+0.02%) ⬆️
core/dbt/contracts/graph/nodes.py 95.26% <100.00%> (+0.01%) ⬆️
core/dbt/contracts/graph/unparsed.py 93.11% <100.00%> (+0.01%) ⬆️
core/dbt/contracts/project.py 97.70% <100.00%> (+0.01%) ⬆️
core/dbt/graph/selector.py 90.38% <100.00%> (+0.06%) ⬆️
core/dbt/parser/manifest.py 92.08% <100.00%> (+0.03%) ⬆️
... and 1 more

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@emmyoop emmyoop requested a review from QMalcolm August 30, 2023 15:08
@emmyoop emmyoop marked this pull request as ready for review August 30, 2023 15:13
@emmyoop emmyoop requested review from a team as code owners August 30, 2023 15:13
@emmyoop emmyoop requested review from eddowh and removed request for a team August 30, 2023 15:13
Copy link
Contributor

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

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

Thank you for doing this work! It's looking great 🙂 One thing that caught my attention is that we're handling disabled semantic models during resolution differently than we handle resolution of all other nodes. It confused me for awhile, and then I recognized that it was necessary due to our indirect referencing from the measure being the intermediary for the lookup (making the DisabledLookup not fit this use case).

It feels weird to me. Seems like we might need a refactoring here sometime, but I think that's out of scope for this.

@emmyoop emmyoop merged commit 7ae3de1 into main Aug 31, 2023
51 checks passed
@emmyoop emmyoop deleted the er/ct-2751-enable-sm branch August 31, 2023 01:18
@emmyoop emmyoop added the user docs [docs.getdbt.com] Needs better documentation label Aug 31, 2023
@FishtownBuildBot
Copy link
Collaborator

Opened a new issue in dbt-labs/docs.getdbt.com: dbt-labs/docs.getdbt.com#3997

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes user docs [docs.getdbt.com] Needs better documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-2751] Support Configuration and Enabling/Disabling Semantic Models
3 participants