Replies: 2 comments 3 replies
-
|
This is Fascinating! I love this proposal. We support automatic type coercion for Pydantic Types so I'd love to derive/compile validation udfs from pydantic models. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Liusixuuu, I agree with @everettVT's point about Pydantic, and I think you mapping from makes sense. Before starting to implement though, I wanted to ask what your thoughts on the DataFrame API was. I think having a core expression like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'd like to propose a first-class, declarative data validation / expectations API for Daft — something like
df.validate([...])— that compiles checks into native Daft expressions so they execute lazily and distributed in the engine, instead of requiring an external framework.Motivation
When building AI and multimodal pipelines on Daft, there's currently no built-in way to assert data-quality constraints (non-null, value ranges, allowed categories, schema/dtype, row-count bounds, uniqueness) as part of the query plan. Today users either:
filter+countchecks (verbose, not reusable, no standardized report), orFor pipelines feeding LLM prompts or embedding generation, silently malformed rows (empty strings, out-of-range values, unexpected nulls in multimodal columns) are a common and costly failure mode — they waste inference spend and corrupt downstream outputs.
Proposed API
Key properties
raise_on_failurefor CI/ETL gating.Alternatives considered
filter/count: works but verbose, error-prone, no standardized/serializable report.Open questions
df.validate(...)entry point, or expressible as regular expressions plus a thin reporting layer?Happy to help scope this down to a minimal v1 (e.g. a handful of tabular expectations + report) and contribute if there's interest.
Beta Was this translation helpful? Give feedback.
All reactions