Hi Team :slightly_smiling_face: We have a problem ...
# troubleshooting
m
Hi Team πŸ™‚ We have a problem with non-nullable enums in an Avro schema of a Kafka topic. I hope some of you faced it and/or have a workaround. The issue is detailed in FLINK-24544. Basically non-null enums can't be consumed using the avro connector, no matter if you declare them as
STRING
or anything else in Flink SQL. We can declare the source, but when it tries consuming, it fails with
Found org.example.MyEnumType, expecting union
We don't have the option to change the producer schema to make it nullable. If you know of a working trick or can point me to a good place to ask, i'd be grateful πŸ™
βœ… 1
For people that ran into the same issue: We managed to work around it. You have to: β€’ Specify the json schema in the connector config:
'value.avro-confluent.schema' = '{full_schema_json}'
β€’ Match the source table DDL very, very precisely - the order, the constraints, the good data mapping from Flink's documentation page. ;)