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

Open
wants to merge 2 commits into
base: main
Choose a base branch
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.12%. Comparing base (5c8a4ab) to head (b25f28f).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9993      +/-   ##
==========================================
- Coverage   88.16%   88.12%   -0.04%     
==========================================
  Files         181      181              
  Lines       22593    22593              
==========================================
- Hits        19918    19911       -7     
- Misses       2675     2682       +7     
Flag Coverage Δ
integration 85.44% <100.00%> (-0.04%) ⬇️
unit 62.13% <100.00%> (ø)

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
2 participants