jk-shah opened a new issue, #41356:
URL: https://github.com/apache/beam/issues/41356

   ### Description
   
   Two common production gaps currently limit `Enrichment` 
(`apache_beam.transforms.enrichment` and `yaml_enrichment.py`):
   
   1. **No File-Backed Reference Lookup Handler**:
      Many pipelines enrich events against small-to-medium (`<256 MB`) 
reference dimension tables stored as `.parquet`, `.csv`, or `.jsonl` files on 
GCS/S3/local disk (country codes, SKU catalogs, merchant tiers). Today 
`yaml_enrichment.py` only supports `BigQuery`, `BigTable`, 
`VertexAIFeatureStore`, and `FeastFeatureStore`, forcing users to stand up 
external database infrastructure even for static reference files or local 
testing.
   2. **No `on_miss` Modes or `error_handling` Dead-Letter Output**:
      Real-world enrichment pipelines need explicit control over missing keys 
(`on_miss: null | drop | dlq | fail`), field `prefix` collision avoidance when 
joining multiple tables, and Beam YAML `error_handling` dead-letter routing 
when remote RPCs fail after retries.
   
   ### Proposed YAML Syntax
   
   ```yaml
   pipeline:
     transforms:
       - type: Enrichment
         input: ReadEvents
         config:
           enrichment_handler: File
           handler_config:
             path: gs://my-bucket/ref/sku_catalog.parquet
             join_key: sku_id
             select_fields: [category, unit_cost]
           prefix: sku_
           on_miss: dlq          # null (left join) | drop (inner join) | dlq | 
fail
           error_handling:
             output: failed_enrichment
   ```
   
   ### Key Capabilities
   1. **`FileEnrichmentHandler`**: Load `.parquet`, `.csv`, or `.json`/`.jsonl` 
via Beam `FileSystems` in worker `__enter__` (or `Shared` memory across 
threads) with static output schema inference.
   2. **`on_miss` & `prefix` Controls**: First-class left-join (`null`), 
inner-join (`drop`), quarantine (`dlq`), and strict (`fail`) semantics plus 
column prefixing to prevent silent field overwrites.
   3. **Beam YAML `error_handling` Integration**: Route RPC timeouts and 
`on_miss: dlq` records to a standard Beam YAML dead-letter output PCollection.
   
   ### Issue Priority
   
   Priority: 2 (default / most feature requests should be filed as P2/P3)
   
   ### Issue Components
   
   - [x] Component: Python SDK
   - [ ] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [x] Component: IO connector
   - [x] Component: Beam YAML
   - [ ] Component: Beam ML
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Infrastructure
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Prism 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]

Reply via email to