ahmedabu98 commented on issue #25749:
URL: https://github.com/apache/beam/issues/25749#issuecomment-1458971747

   Actually, getting some luck with RowTypeConstraint. The following works fine:
   ```
   output = (p
        | beam.Create([{"num": 1, "name": "a"}, {"num": 2, "name": "b"}])
        | beam.Map(lambda el: beam.Row(**el))
             .with_output_types(beam.row_type.RowTypeConstraint.from_fields([
             ('num', int),
             ('name', str)
           ]))
        | beam.io.StorageWriteToBigQuery(table=table))
   ```


-- 
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