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

feat(python): add except_cols argument to when_matched_update_all and when_not_matched_insert_all for excluding specific columns #3098

Merged
merged 1 commit into from
Jan 4, 2025

Conversation

mrjsj
Copy link
Contributor

@mrjsj mrjsj commented Jan 3, 2025

Description

Adds optional argument exclude to MergeBuilder functions, so that it is simpler to update all columns except a select few.

Related Issue(s)

Documentation

@github-actions github-actions bot added the binding/python Issues for the Python package label Jan 3, 2025
@mrjsj
Copy link
Contributor Author

mrjsj commented Jan 3, 2025

I am unsure on the naming of the argument. Is except better?

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.52%. Comparing base (a639dea) to head (439c340).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3098      +/-   ##
==========================================
- Coverage   72.54%   72.52%   -0.02%     
==========================================
  Files         128      128              
  Lines       41201    41201              
  Branches    41201    41201              
==========================================
- Hits        29890    29882       -8     
  Misses       9409     9409              
- Partials     1902     1910       +8     

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

@ion-elgreco
Copy link
Collaborator

@mrjsj except sounds better. Can you rename it, then we are good to go

@mrjsj
Copy link
Contributor Author

mrjsj commented Jan 3, 2025

@ion-elgreco forgot bare except is reserved, so have to change it to except_cols, except_columns. Or stick with exclude. Any other ideas?

@ion-elgreco
Copy link
Collaborator

Except_cols is fine

@mrjsj mrjsj changed the title feat(python): add exclude argument to when_matched_update_all and when_not_matched_insert_all for excluding specific columns feat(python): add except_cols argument to when_matched_update_all and when_not_matched_insert_all for excluding specific columns Jan 3, 2025
@ion-elgreco ion-elgreco enabled auto-merge January 4, 2025 00:43
@ion-elgreco ion-elgreco disabled auto-merge January 4, 2025 00:43
@ion-elgreco
Copy link
Collaborator

@mrjsj can you squash your commits and sign off please? :)

Signed-off-by: jsj <jsj>
@mrjsj mrjsj force-pushed the feat/add-merge-exclude-param branch from c51f2e7 to 439c340 Compare January 4, 2025 12:10
@mrjsj
Copy link
Contributor Author

mrjsj commented Jan 4, 2025

@ion-elgreco done - i hope. :)

@ion-elgreco ion-elgreco enabled auto-merge January 4, 2025 12:14
@ion-elgreco ion-elgreco added this pull request to the merge queue Jan 4, 2025
Merged via the queue into delta-io:main with commit 6430151 Jan 4, 2025
24 checks passed
@mrjsj mrjsj deleted the feat/add-merge-exclude-param branch January 4, 2025 14:21
@g-kannan
Copy link

g-kannan commented Jan 5, 2025

Hi All, thanks for adding this feature. In which release we can expect this via pip install? I tried with 0.23.1 but its not included in it guess.

@pierre-monnet
Copy link

Hi All, thanks for adding this feature. In which release we can expect this via pip install? I tried with 0.23.1 but its not included in it guess.

0.23.2 included it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/python Issues for the Python package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Except/Exclude columns in whenMatchedUpdate - Merge
4 participants