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

Allows snapshots to have a list of unique keys #9993

Closed
wants to merge 3 commits into from

Conversation

AGPapa
Copy link
Contributor

@AGPapa AGPapa commented Apr 22, 2024

resolves #9992

Problem

Currently the unique_key must be a string. It can be a column name or an expression. This PR changes it so it can be a list of column names or expressions.

Solution

This solution is modeled off of #4618.

It is paired with this change in dbt-adapters dbt-labs/dbt-adapters#182

I'm open to feedback! Particularly on the best way to add tests for this feature. I've run this in development on one of my dbt projects and it works as expected.

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

@AGPapa AGPapa requested a review from a team as a code owner April 22, 2024 12:33
@cla-bot cla-bot bot added the cla:yes label Apr 22, 2024
@github-actions github-actions bot added the community This PR is from a community member label Apr 22, 2024
Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.68%. Comparing base (84456f5) to head (cffc43d).
Report is 189 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9993      +/-   ##
==========================================
- Coverage   88.74%   88.68%   -0.06%     
==========================================
  Files         180      180              
  Lines       22449    22448       -1     
==========================================
- Hits        19923    19909      -14     
- Misses       2526     2539      +13     
Flag Coverage Δ
integration 85.96% <100.00%> (-0.18%) ⬇️
unit 63.37% <100.00%> (-0.01%) ⬇️

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

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

@graciegoheen graciegoheen added the ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering label Apr 23, 2024
@graciegoheen graciegoheen self-assigned this Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes community This PR is from a community member ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Allows snapshots to have a list as a unique key
3 participants