Dealing with array of record in AVRO
See original GitHub issueHi find this issue (https://github.com/corunet/kloadgen/issues/64) similar to my need but not satisfaisant answered or solutions
I actually have in my main record an array of records
field:
{
... other fields
{"name": "BusInputs",
"type": {
"type": "array",
"doc": "Business units specifics datas needed to deduce BUs contexts.",
"items": {
"name": "CostingRequestBUItem",
"namespace": "costingrequest",
"type": "record",
"fields": [
{"name": "ClientCode", "type": {"type": "string", "avro.java.string": "String"},
{"name": "ArrivalIncoterm", "type": ["null", {"type": "string", "avro.java.string": "String"}],
{"name": "ArrivalIncotermPlace", "type": {"type": "string", "avro.java.string": "String"},
...
]
}
}
}
]
}
This structure is represented in the KLoadGen by the configuration below:
Here i find a way to generate many array items (5 in the example) with BusInputs[5].ClientCode
but i need to be precise about each data in each array item.
Is there a sample of what i want to do (not possible currently)
Do you have any solution or workaround ?
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
How to create schema containing list of objects using Avro?
You need to use array type for creating the list. Following is the updated schema that handles your usecase.
Read more >Specification - Apache Avro - The Apache Software Foundation!
Avro supports six kinds of complex types: records, enums, arrays, maps, unions and fixed. Records. Records use the type name “record” and support...
Read more >Chapter 7. Avro Schemas
Avro schema definitions are JSON records. Because it is a record, it can define multiple fields which are organized in a JSON array....
Read more >Schema for Array of Array in Avro - Cloudera Community
I was trying to write some sample Avro schemas, and was unable to create one for an array of array. Is there something...
Read more >Using Array of Records in AVRO with kafka connect
I have a problem with an array of records in AVRO while trying to use kafka connect FileStreamSinkConnector. config: bootstrap.servers=kafka:9092.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hi @Rivarsal , i test this enhancement today in my jMeter project;
it works like expected in my usecase; thanks a lot !
Hey @Rivarsal ; no worries 😃 i will test this pr this day and give you a feedback 😃