Issue #8143 : Add Database value validation transform - #8148
Open
mattcasters wants to merge 3 commits into
Open
Conversation
Load target table constraints at start and report every failing field on a row (length, encoding, numeric overflow, nulls, UUID/JSON) before insert. PostgreSQL dialect enricher, error hop, docs, and integration test 0043. Fixes apache#8143
mattcasters
marked this pull request as ready for review
August 28, 2026 18:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a Database value validation transform that checks incoming rows against a target table before insert, so a PostgreSQL (or other RDBMS) failure is no longer "one column of one row among millions" with no useful field/value in the message.
Fixes #8143
Why
Table Output, Insert/Update and bulk COPY typically stop at the first database error. The message rarely names the stream field and the offending value. Data Validator can report all errors, but every rule is hand-authored and drifts from the live table.
How
DBV001–DBV008).Checks (generic JDBC + PostgreSQL enricher):
varchar)NUL(U+0000)numeric(p,s)overflow after rounding to scaleint2/int4/int8)Unique keys, foreign keys and CHECK constraints are not pre-flighted.
Tests
ColumnValueValidatorTest(11),PostgreSqlColumnValueConstraintsTest(6),DatabaseValueValidationMetaTest(load/save)main-0043-database-value-validation(PostgreSQLunit-test-db) — mixed good/bad rows, golden error hop, only the valid row is insertedDocs
User-manual page plus links from Table Output, Insert/Update, PostgreSQL bulk loader, Data Validator and error handling.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean install apache-rat:checkto make sure basic checks pass. A more thorough check will be performed on your pull request automatically.git rebase -i.addresses #123), if applicable.To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.