How can I convert avsc files to avdl files?
Asked Answered
I

3

10

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.

Ilyse answered 22/5, 2019 at 17:20 Comment(0)
R
1

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.

Resistless answered 20/12, 2019 at 22:44 Comment(0)
G
1

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.

Gracie answered 25/3, 2021 at 8:58 Comment(1)
Would you agree to bring this functionality to savro ? https://mcmap.net/q/1109444/-how-can-i-convert-avsc-files-to-avdl-filesTeller
T
0

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()
Teller answered 15/1, 2022 at 16:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.