It is common to convert avro avdl
files (idl files) to avsc
files (schema files). I want to convert in the other direction, from avsc
to avdl
, because I have some avsc files created manually and want to see them in the simpler and prettier avdl format.
How can I convert avsc files to avdl files?
Asked Answered
You can try out the java utility I wrote: SchemaUtils.writeIdlProtocol, it basically allows you to save a bunch of ovro schema's into a avdl file.
You can try avsc2avdl tool (author here). It might not work all cases, because it's still in progress, but I use it at work and it does it's job.
See also savro
https://github.com/irajhedayati/savro#avro-schema-to-avro-idl
Avro Schema to Avro IDL You also can convert an Avro schema to an Avro IDL.
import ca.dataedu.savro._
import org.apache.avro.Schema
val schema: Schema = ???
val idl: String = new AvroSchemaToIdl(schema, "ProtocolName").convert()
© 2022 - 2024 — McMap. All rights reserved.
savro
? https://mcmap.net/q/1109444/-how-can-i-convert-avsc-files-to-avdl-files – Teller