Skip to content

Return DataFrames from _extract_tuple so ReferentialIntegrity scores instead of erroring#889

Open
SAY-5 wants to merge 1 commit into
sdv-dev:mainfrom
SAY-5:fix-relationship-validity-referential-integrity
Open

Return DataFrames from _extract_tuple so ReferentialIntegrity scores instead of erroring#889
SAY-5 wants to merge 1 commit into
sdv-dev:mainfrom
SAY-5:fix-relationship-validity-referential-integrity

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jul 20, 2026

Copy link
Copy Markdown

Resolve #884

RelationshipValidity._extract_tuple indexed the key columns with a single label, so it returned pd.Series for single-column keys. ReferentialIntegrity.compute_breakdown reads real_pk_df.columns, which raised AttributeError: 'Series' object has no attribute 'columns' and left the metric with a nan score in the DiagnosticReport. Selecting with a list gives the pd.DataFrame the metric expects while still handling composite keys.

CardinalityBoundaryAdherence already accepts either type, so its score is unchanged.

…instead of erroring

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@SAY-5
SAY-5 requested a review from a team as a code owner July 20, 2026 19:52
@SAY-5
SAY-5 requested review from sarahmish and removed request for a team July 20, 2026 19:52
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.

ReferentialIntegrity metric erroring with AttributeError when running DiagnosticReport

1 participant