liferoad commented on code in PR #35692: URL: https://github.com/apache/beam/pull/35692#discussion_r2242897439
########## sdks/python/apache_beam/yaml/tests/validate_with_schema.yaml: ########## @@ -43,53 +43,55 @@ pipelines: - {name: "Alice", age: 30, score: 95.5} - {name: "Bob", age: 25, score: 88.0} + # TODO - Rethink error handling since schema mismatch in Create transform + # isn't allowed anymore. # Validate a Beam Row with a predefined schema with error handling - - pipeline: - type: composite - transforms: - - type: Create - config: - elements: - - {name: "Alice", age: 30, score: 95.5} - - {name: "Bob", age: 25, score: 88.0} - - {name: "Charlie", age: 27, score: "apple"} - - {name: "David", age: "twenty", score: 90.0} - - {name: 30, age: 40, score: 100.0} - - type: ValidateWithSchema - input: Create - config: - schema: - type: object - properties: - name: - type: string - age: - type: integer - score: - type: number - required: [name, age, score] - error_handling: - output: invalid_rows - - type: MapToFields - input: ValidateWithSchema.invalid_rows - config: - language: python - fields: - name: "element.name" - age: "element.age" - score: "element.score" - - type: AssertEqual - input: MapToFields - config: - elements: - - {name: "Charlie", age: 27, score: "apple"} - - {name: "David", age: "twenty", score: 90.0} - - {name: 30, age: 40, score: 100.0} - - type: AssertEqual - input: ValidateWithSchema - config: - elements: - - {name: "Alice", age: 30, score: 95.5} - - {name: "Bob", age: 25, score: 88.0} + # - pipeline: + # type: composite + # transforms: + # - type: Create + # config: + # elements: + # - {name: "Alice", age: 30, score: 95.5} + # - {name: "Bob", age: 25, score: 88.0} + # - {name: "Charlie", age: 27, score: "apple"} + # - {name: "David", age: "twenty", score: 90.0} + # - {name: 30, age: 40, score: 100.0} + # - type: ValidateWithSchema + # input: Create + # config: + # schema: Review Comment: @damccorm like this. -- 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: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org