Support Questions
Find answers, ask questions, and share your expertise

I can't read from Kafka Json fields that contain a dash "-" in the field name: using ConsumeKafkaRecord_0_10 with AvroRecordSetWriter

I can't read from Kafka Json fields that contain a dash "-" in the field name: using ConsumeKafkaRecord_0_10 with AvroRecordSetWriter

New Contributor

I am using ConsumeKafkaRecord_0_10 with JsonTreeReader and an AvroRecordSetWriter to read json data from kafka and save it as ORC files (ConsumeKafkaRecord_0_10 -> MergeContent -> ConvertAvroToORC).


I can't add fields with a dash in the name to the avro schema, because avro does not allow dash characters in the name of the field.

I need to save http_headers that contains fields like: Accept-Encoding, User-Agent, Accept-Language ...

How can I do that?

Is there a way to escape dash character in the schema?

I don't want to use ConsumeKafka_0_10 processor because it's 30x slower than ConsumeKafkaRecord_0_10.