Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.6.3
-
None
-
None
Description
Avro currently includes AvroTextOutputFormat, which will only write an Avro file with a bytes schema. It would be nice if there were an OutputFormat that took a JSON string as a value, and a schema defined with -Davro.output.schema=... and wrote an Avro file based on that.
This has been implemented with TypedBytes in a third-party repository already, but I'd imagine it would be trivial to make it work with text: https://github.com/tomslabs/avro-utils/blob/master/src/main/java/com/tomslabs/grid/avro/TextTypedBytesToAvroOutputFormat.java
It would also be nice to just add the functionality into the existing AvroTextOutputFormat by just checking whether avro.output.schema is defined or not, but that could break backwards-compatibility.