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.



--
View this message in context: 
http://apache-avro.679487.n3.nabble.com/Field-level-reference-across-Avro-Schema-tp4029668.html
Sent from the Avro - Developers mailing list archive at Nabble.com.

Reply via email to