dbt-labs / dbt-core

dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
https://getdbt.com
Apache License 2.0
9.68k stars 1.61k forks source link

Allow snapshots to be defined in YAML. #10749

Closed peterallenwebb closed 1 day ago

peterallenwebb commented 1 week ago

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

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 92.85714% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.97%. Comparing base (054c6fd) to head (86cf015). Report is 26 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #10749 +/- ## ========================================== + Coverage 88.95% 88.97% +0.01% ========================================== Files 181 181 Lines 22959 22977 +18 ========================================== + Hits 20424 20444 +20 + Misses 2535 2533 -2 ``` | [Flag](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10749/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | Coverage Δ | | |---|---|---| | [integration](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10749/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `86.15% <90.00%> (+0.01%)` | :arrow_up: | | [unit](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10749/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `62.39% <38.57%> (+0.02%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10749/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | Coverage Δ | | |---|---|---| | [Unit Tests](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10749/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `62.39% <38.57%> (+0.02%)` | :arrow_up: | | [Integration Tests](https://app.codecov.io/gh/dbt-labs/dbt-core/pull/10749/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbt-labs) | `86.15% <90.00%> (+0.01%)` | :arrow_up: |
peterallenwebb commented 1 day ago

These changes were merged in a different PR.