prabhnoor0212 opened a new issue, #38243: URL: https://github.com/apache/beam/issues/38243
### What happened? __Description__: In Python Enrichment, `RequestResponseIO` supports passing batching kwargs from `Caller.batch_elements_kwargs()` into `BatchElements(**kwargs)`. `BatchElements` supports `max_batch_duration_secs`, but `BigQueryEnrichmentHandler` currently only sets: - `min_batch_size` - `max_batch_size` As a result, users of `BigQueryEnrichmentHandler` cannot configure `max_batch_duration_secs`, even though the downstream batching transform supports it. __Code path__: BigQueryEnrichmentHandler -> Enrichment -> RequestResponseIO -> BatchElements __Current behavior__ `max_batch_duration_secs` is not available/configurable from `BigQueryEnrichmentHandler` and therefore is never forwarded to `BatchElements`. __Expected behavior__ `BigQueryEnrichmentHandler` should optionally accept `max_batch_duration_secs` and pass it through `batch_elements_kwargs()` when batching is enabled. __Proposed fix__ 1. Add optional `max_batch_duration_secs: Optional[float] = None` to `BigQueryEnrichmentHandler.__init__`. 2. When `query_fn` is not used, include it in `_batching_kwargs` (when provided). __Additional note__: `CloudSQLEnrichmentHandler` appears to have the same batching-kwargs limitation and may benefit from parity in a follow-up or same PR. ### Issue Priority Priority: 2 (default / most bugs should be filed as P2) ### Issue Components - [x] Component: Python SDK - [ ] Component: Java SDK - [ ] Component: Go SDK - [ ] Component: Typescript SDK - [ ] Component: IO connector - [ ] Component: Beam YAML - [ ] Component: Beam examples - [ ] Component: Beam playground - [ ] Component: Beam katas - [ ] Component: Website - [ ] Component: Infrastructure - [ ] Component: Spark Runner - [ ] Component: Flink Runner - [ ] Component: Samza Runner - [ ] Component: Twister2 Runner - [ ] Component: Hazelcast Jet Runner - [ ] Component: Google Cloud Dataflow Runner -- 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]
