Cannot use BigQuery CDC, fields beginning with underscore are not serialized #513
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
Steps to reproduce
I am attempting to implement BigQuery CDC using the instructions here. This requires the addition of a pseudocolumn with the name "_change_type" in the protobuffer message:
When the message is serialized with
Message.serialize()
the contents of_change_type
are not included in the serialized output.The omission happens here where it calls super in
__setattr__
if the first character of the field begins with_
(presumably so_pb
functions correctly).I also tried setting
json_name=
hoping this would allow an alternative field name:However the BigQuery Storage Write API returns with an error that the column
change_type
does not exist.I was hoping to use this library in lieu of .proto files, but cannot until this is fixed. Thanks!
The text was updated successfully, but these errors were encountered: