Skip to content

feat: add get_row_flags() and duplicate handling for sundering - #533

Merged
rich-iannone merged 7 commits into
mainfrom
feat-row-flags
Nov 7, 2026
Merged

rich-iannone merged 7 commits into
mainfrom
feat-row-flags

Conversation

@rich-iannone

Copy link
Copy Markdown
Member

This PR adds Validate.get_row_flags(), which returns the target table with a pb_failed_<i>_ column for each row-level step, plus pb_n_failed_ (the number of steps the row failed) and pb_row_score_ (the row's dimension-weighted pass fraction, 0–1). Both get_row_flags() and get_sundered_data() gain duplicates= ("keep_first", "keep_last", "flag_all", or None) and duplicates_order_by=.

These let rows_distinct() steps take part by choosing which copy of a duplicate is kept. rows_distinct() itself, and its reported counts, are unchanged. rows_complete() steps now count when sundering, so rows with missing values go to the "fail" piece; this is a behaviour change. Calling either method before interrogation, or after interrogate(collect_tbl_checked=False), raises a clear ValueError, and get_sundered_data(type="fail") no longer fails on PySpark when there are no row-level steps.

@rich-iannone
rich-iannone merged commit 12b305d into main Nov 7, 2026
9 checks passed
@rich-iannone
rich-iannone deleted the feat-row-flags branch November 7, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant