Skip to content

feat: add the data_freshness() validation method#345

Merged
rich-iannone merged 17 commits intomainfrom
feat-data-freshness
Jan 21, 2026
Merged

feat: add the data_freshness() validation method#345
rich-iannone merged 17 commits intomainfrom
feat-data-freshness

Conversation

@rich-iannone
Copy link
Member

This PR adds a new data_freshness() validation method that checks whether datetime data is within an acceptable age threshold. It supports flexible time specifications (e.g., "24 hours", "7 days", timedelta), custom reference times, timezone handling with automatic mismatch detection, and full internationalization for all languages Pointblank supports.

Here's an example:

import pointblank as pb
import polars as pl
from datetime import datetime, timedelta

data = pl.DataFrame({"updated_at": [datetime.now() - timedelta(hours=2)]})

validation = (
    pb.Validate(data)
    .data_freshness(column="updated_at", max_age="24 hours")
    .interrogate()
)
image

@github-actions github-actions bot temporarily deployed to pr-345 January 21, 2026 01:51 Destroyed
@github-actions github-actions bot temporarily deployed to pr-345 January 21, 2026 01:54 Destroyed
@rich-iannone rich-iannone marked this pull request as ready for review January 21, 2026 03:27
@rich-iannone rich-iannone merged commit 38f95c6 into main Jan 21, 2026
9 checks passed
@rich-iannone rich-iannone deleted the feat-data-freshness branch February 16, 2026 13:32
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