Skip to content

feat(structured-ingestion-mongodb) DBI-1096: Structured ingestion settings through table mappings with validation - #4818

Open
pfcoperez wants to merge 2 commits into
mainfrom
DBI-91/connectors/mongodb/structured-ingestion/3-mapping-settings
Open

pfcoperez wants to merge 2 commits into
mainfrom
DBI-91/connectors/mongodb/structured-ingestion/3-mapping-settings

Conversation

@pfcoperez

@pfcoperez pfcoperez commented Sep 17, 2026

Copy link
Copy Markdown
Member

Add structured_ingestion and drop_unexpected_values to TableMapping and QRepConfig, and thread them from the mirror configuration down to the connectors: through NameAndExclude for CDC pulls, and through the QRep and snapshot workflows for the initial load and standalone QRep mirrors.

Mirror validation gains the structured ingestion rules, factored into the structured package so CDC and QRep creation share them.

Nothing acts on the settings yet: the connectors keep landing documents as JSON. The e2e tests cover typed mappings passing through and the validation errors.

On top of the contract, PeerDB API and UI have been expanded be compatible with the structured ingestion mappings. The UI changes are not visible uless the PEERDB_UI_STRUCTURED_INGESTION_ENABLED dynamic setting is set to true:

Screenshot From 2026-09-18 11-42-55

The dynamic setting will be set to true default once the flattening logic is merged.

UI changes are isolated in the second commit of this PR.

NOTE: This is a split up from a feature branch (#4774) where all pieces are integrated.

Part of: https://linear.app/clickhouse/issue/DBI-1096

…h validation

Add `structured_ingestion` and `drop_unexpected_values` to TableMapping and
QRepConfig, and thread them from the mirror configuration down to the
connectors: through NameAndExclude for CDC pulls, and through the QRep and
snapshot workflows for the initial load and standalone QRep mirrors.

Mirror validation gains the structured ingestion rules, factored into the
`structured` package so CDC and QRep creation share them: only supported source
peers (MongoDB for now), at least one column, and every column declaring a valid
destination type, as the mapping carries the destination schema itself. The
existing custom column type check moves to the same package.

Nothing acts on the settings yet: the connectors keep landing documents as JSON.
The e2e tests cover typed mappings passing through and the validation errors.

NOTE: This is a split up from a feature branch (#4774) where all pieces are integrated.
@pfcoperez pfcoperez self-assigned this Sep 17, 2026
@pfcoperez
pfcoperez marked this pull request as ready for review September 18, 2026 11:06
@pfcoperez
pfcoperez requested a review from a team as a code owner September 18, 2026 11:06
@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: The newly added TestGetTablesStructuredIngestionSupported subtest fails deterministically in all three matrix legs for all four API suites (with a concrete expected:false/actual:true mismatch at flow/e2e/api_test.go:1252), and the test does not exist on main, so it is a real bug in PR #4818 rather than flakiness.
Confidence: 0.95

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

…erDB level UI to set-up structured ingestion schemas manually.
@pfcoperez
pfcoperez force-pushed the DBI-91/connectors/mongodb/structured-ingestion/3-mapping-settings branch from c9a806e to 2c153f3 Compare September 18, 2026 11:33
@claude

claude Bot commented Sep 18, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant