shikhabhadoria opened a new pull request, #41451: URL: https://github.com/apache/beam/pull/41451
Addresses #41356. This is 1 of 3 stacked PRs that replace #41423. ## Summary - Adds `on_miss` (`null`, `drop`, `dlq`, `fail`) and `prefix` to Python `Enrichment`. - `null` (default) is a left join: known enriched fields are present and set to `None` when the key is missing, so every output row has the same schema. `drop` is an inner join. `dlq` routes the miss to the dead-letter output. `fail` raises `KeyError`. - `prefix` is prepended to enriched field names so a join does not silently keep the input column when names collide. - `RequestResponseIO` and `Enrichment` gain `with_exception_handling`, so RPC failures and `on_miss="dlq"` misses share one dead-letter path. `on_miss="dlq"` is rejected unless that path is configured. - Output schema is inferred when the handler implements `get_output_schema()` or exposes a known column list (`select_fields`, `column_names`, `feature_ids`, `feature_names`, `output_fields`). `FileEnrichmentHandler` and the Beam YAML surface are the next two PRs. Merge this one first. ## Test plan - [x] `pytest apache_beam/transforms/enrichment_test.py apache_beam/io/requestresponse_test.py` — 17 passed - [x] `ruff check` on the changed Python files - [x] `git diff --check` (no whitespace errors) - [ ] Python precommit ## Checklist - [x] If this contribution is large, please file an Apache Individual Contributor License Agreement. - [x] Mention the appropriate issue in the description (`addresses #41356`). - [x] Update `CHANGES.md` with noteworthy changes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
