Skip to content

Commit

Permalink
Fix writing raw messages to pubsub
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Kinard <[email protected]>
  • Loading branch information
Polber committed Aug 27, 2024
1 parent 857ecce commit a0c9245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdks/python/apache_beam/yaml/yaml_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def _create_formatter(
field_names = [field.name for field in beam_schema.fields]
if len(field_names) != 1:
raise ValueError(f'Expecting exactly one field, found {field_names}')
return lambda row: getattr(row, field_names[0])
return lambda row: getattr(row, field_names[0]).encode('utf-8')
elif format == 'JSON':
return json_utils.json_formater(beam_schema)
elif format == 'AVRO':
Expand Down

0 comments on commit a0c9245

Please sign in to comment.