confluentinc/kafka-connect-datagen

Schema names are not compatible with Protobuf and results in Descriptors$DescriptorValidationException

rspurgeon opened this issue · 1 comments

The internal Connect structure created by Avro Random contains Schema names with . which is incompatible with Protobuf and the Protobuf Converter. Ideally, eventually a resolution would be created in the Confluent Protobuf solution, If not we may need to modify the schema names. For now a workaround with the SetSchemaMetadata SMT is possible, see the config folder for an example.

Example of error message without the SMT:

Caused by: java.lang.IllegalStateException: com.google.protobuf.Descriptors$DescriptorValidationException: ksql.users: "ksql.users" is not a valid identifier.
        at io.confluent.connect.protobuf.ProtobufData.rawSchemaFromConnectSchema(ProtobufData.java:324)
        at io.confluent.connect.protobuf.ProtobufData.fromConnectSchema(ProtobufData.java:304)
        at io.confluent.connect.protobuf.ProtobufData.fromConnectData(ProtobufData.java:109)
        at io.confluent.connect.protobuf.ProtobufConverter.fromConnectData(ProtobufConverter.java:83)
        at org.apache.kafka.connect.storage.Converter.fromConnectData(Converter.java:63)