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

Allow snapshots to be defined with YAML only. #10762

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

peterallenwebb
Copy link
Contributor

Resolves #10246

Problem

Users had to awkwardly create jinja snapshot blocks in SQL files, even for very simple snapshots.

Solution

Delight users by allowing snapshots to be defined intuitively, with just a few lines of YAML.

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 or 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.
  • This PR includes type annotations for new and modified functions.

@peterallenwebb peterallenwebb requested a review from a team as a code owner September 23, 2024 17:59
@cla-bot cla-bot bot added the cla:yes label Sep 23, 2024
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.97%. Comparing base (db69473) to head (7bf392e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10762   +/-   ##
=======================================
  Coverage   88.97%   88.97%           
=======================================
  Files         181      181           
  Lines       22956    22977   +21     
=======================================
+ Hits        20424    20444   +20     
- Misses       2532     2533    +1     
Flag Coverage Δ
integration 86.15% <90.47%> (+<0.01%) ⬆️
unit 62.39% <4.76%> (-0.06%) ⬇️

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

Components Coverage Δ
Unit Tests 62.39% <4.76%> (-0.06%) ⬇️
Integration Tests 86.15% <90.47%> (+<0.01%) ⬆️

@gshank gshank added the user docs [docs.getdbt.com] Needs better documentation label Sep 23, 2024
Copy link
Contributor

@gshank gshank left a comment

Choose a reason for hiding this comment

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

Looks good!

@peterallenwebb peterallenwebb merged commit 46da967 into main Sep 23, 2024
77 of 78 checks passed
@peterallenwebb peterallenwebb deleted the paw/define-snapshots-in-yaml-2 branch September 23, 2024 20:33
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.

[Feature] No more jinja block for snapshots - new snapshot design ideas
2 participants