sakshammalik260-cse commented on issue #41223: URL: https://github.com/apache/beam/issues/41223#issuecomment-7308480262
Hi @jk-shah, I've completed the initial investigation of the Python SDK and YAML infrastructure for this feature. I've also established a local regression baseline of 911 passing tests, 0 failures, and 8 skipped tests. I'm proposing a schema-aware `Expect` PTransform implemented using a single native Python `ParDo`, reusing Beam's existing tagged outputs, schema infrastructure, and Metrics API. A thin YAML adapter would expose the transform as `type: Expect`. Before proceeding with implementation, I'd appreciate feedback on a few design decisions: **1. Expression evaluation** The existing generic YAML expression infrastructure does not directly support all the proposed SQL-style predicates, particularly `IS NOT NULL` and `LIKE`. Would a restricted, documented native Python SQL-style predicate evaluator be acceptable, or should this feature reuse Beam SQL through its existing cross-language infrastructure? The native approach would avoid arbitrary code execution and additional dependencies. **2. Multiple rule violations** I propose evaluating all rules and applying deterministic action precedence: `fail > dlq > drop` A rejected record routed to the DLQ would contain metadata for all violated rules. **3. NULL semantics** I propose SQL three-valued logic, where only TRUE passes a rule and both FALSE and UNKNOWN are treated as violations. **4. Output contracts** Valid records would preserve their original schema. The configurable DLQ output would contain the original record and structured violation metadata. For YAML, I propose following the existing conventions for default main-output resolution and ensuring that DLQ outputs are consumed or exported. Please let me know whether these approaches align with the intended scope, particularly regarding expression evaluation and DLQ semantics. No implementation changes have been made yet. I'm happy to adjust the design based on feedback before proceeding. Thanks! -- 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]
