Skip to content

Conversation

@rich-iannone
Copy link
Member

@rich-iannone rich-iannone commented Nov 22, 2025

This PR ensures that detailed notes on the expectation and result of a col_schema_match() validation step is presented at the bottom of the validation report. So with this validation code:

import polars as pl
import pointblank as pb

tbl_pl = pl.DataFrame(
    {
        "a": ["apple", "banana", "cherry", "date"],
        "b": [1, 6, 3, 5],
        "c": [1.1, 2.2, 3.3, 4.4],
    }
)

schema = pb.Schema(
    columns=[
        ("a",),
        ("z",),
        ("c", ["Float64", "invalid"]),
        ("b", "Int64"),
    ]
)

validation = (
    pb.Validate(data=tbl_pl)
    .col_schema_match(
        schema=schema,
        complete=True,
        in_order=True,
        case_sensitive_colnames=True,
        case_sensitive_dtypes=True,
        full_match_dtypes=True,
    )
    .interrogate()
)

validation

We get this validation report with an included note in the footnotes section:

image

Note that users have to reveal the detailed schema comparison table through the use of the disclosure triangle (with the 'Schema Comparison' text).

All components of the notes are translated into all supported languages (via the lang= parameter in Validate).

Fixes: #324

@rich-iannone rich-iannone marked this pull request as ready for review November 23, 2025 00:05
@rich-iannone rich-iannone merged commit ac739df into main Nov 23, 2025
9 checks passed
@rich-iannone rich-iannone deleted the feat-notes-col-schema-match branch November 23, 2025 00:06
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.

Produce note on column schema expectations and their results

2 participants