Hi! Could you clarify your intention a bit?
Is the goal in the second CustomizedRecordData to have a matching field with what's in CommonData? Or is the goal to have the first field be CommonData (as in the first CustomizedRecordData), but followed by additional fields? -Sean On Tue, Mar 18, 2014 at 10:18 PM, hiteshpahuja <[email protected]>wrote: > I am new to Avro, using it for plain serialization and de-serialization > purposes. I have defined a data model > > {"namespace": "recordData", > "type": "record", > "name": "CommonData", > "fields": [ > {"name": "recordId", "type": "string"}, > {"name": "recordDate", "type": ["string", "null"]}, > {"name": "recordPrice", "type": ["int", "null"]}, > {"name": "customer", "type": "string"} > ] > } > > I can easily import CommonData in another schema named CustomizedSchema > > {"namespace": "recordData", > "type": "record", > "name": "CustomizedRecordData", > "fields": [ > {"name": "custRecordId", "type": "recordData.CommonData"} > ] > } > > This works fine for me. But I wanted to do this like > > {"namespace": "recordData", > "type": "record", > "name": "CustomizedRecordData", > "fields": [ > {"name": "custRecordId", "type": "recordData.CommonData. > custRecordId"}, > {"name": "recordDate", "type": ["string", "null"]} > ] > } > > > When I do this , Avro maven plugin gives exception while code generation > saying "recordData.CommonData. custRecordId" undefined field. How can I > import definitions at field level not an record level. Any suggestions. > > > >
