redpanda-data / connect

Fancy stream processing made operationally mundane
https://docs.redpanda.com/redpanda-connect/about/
8.14k stars 840 forks source link

emit default values for non populated fields in protobuf #3022

Open ealonsodb opened 2 days ago

ealonsodb commented 2 days ago

When you use schema_registry_decode processor, the protobuf default values (0 for int32, "" for string, false for bool, 0.0 for float, etc...) are not populated in the row. With this new parameter you can have all those default values populated, no need to check for nulls after that processor

CLAassistant commented 2 days ago

CLA assistant check
All committers have signed the CLA.

rockwotj commented 1 day ago

Thanks for this! I will review after Thanksgiving.

One quick note is it would be good if the configuration option was either nested in a protobuf_options object or if the field was prefixed with protobuf to make it more clear what it was for (also for alignment with avro). I personally prefer the former option