-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't produce AVRO objects that have an array of records property #70
Comments
Any update on this issue? I have same requirements I'm getting |
Try this schema. I can see multiple issues with the schema you posted. First one is, the name references is not wrapped with double quotes (") and the items in the array should be embedded with in [ ].
|
I'm trying to create an Avro schema that defines an object more complex than routine. Specifically, I want it to have a property that holds an array of records. However, I'm unable to define it through the schema. I'm using ksql-datagen and thus utilize the Avro Random Generator in schema building.
My aim is a structure like this,
where
My AVRO schema looks like this,
I get the error
No type: {"name":"reference","type":{"name":"reference","type":"record","fields":[{"name":"age","type":{"type":"string","arg.properties":{"options":["13","14"]}}}]}}
I have tried different ways of defining the array, such as removing the first name and type in items. But that gets me this error,
org.apache.kafka.connect.errors.DataException: Invalid Java object for schema type STRUCT: class org.apache.avro.generic.GenericData$Record for field: "null"
A single record property works fine i.e. address property, but I can't construct an array of records. Could any point out what I'm doing wrong?
The text was updated successfully, but these errors were encountered: