Reputation: 1
We have a big avro model currently written using IDL (avdl). We create a shared.avdl file with shared records, and then we're using import idl
functionality to import the records into other records. We are converting the file to an avsc file, and then it looks like each shared record get's recreated as their own record inside the avsc file.
In this tutorial, they say to just use the full declaration of the shared record;
"type":"com.deepti.sample.avro.schema.Author"
.
But this is not the case when auto-generating the avsc file.
For those of you who also writes your avro model using avdl, how do you define shared records which is used in other records?
I can add that we are sharing our schemas through SchemaRegistry, and right now we only upload the main avsc files, since they contain all shared records. I saw some suggestions which suggested us to write the model in avsc, but if I'm correct we then need to upload every shared record to SchemaRegistry, and then make every consumer read each individual shared schema? This seems like hazzle... There must be a better way?
We are currently using the following plugins to convert the avdl file into avsc file;
com.github.davidmc24.gradle.plugin.avro
. This converts the avdl into avpr, and then takes the avpr files and convert them into avsc.
Avro multiple record of same type in single schema : This post is about using the same schema multiple times in the same record. I want to use the same schema in different records.
Upvotes: 0
Views: 11