Open wanghaisheng opened 9 years ago
there are two ways for generating avro schema for FHIR spec, 1、we can use HAPI hapi-fhir-structures-dstu2 to generate avro schema from java class using reflection 2、we can write some transformation codes to generate avro schema from structureDefinition in the spec
https://github.com/fhirbase/fhirbase/tree/master/fhir 可以使用这个目录下整理好的datatype resource的structuredefintion的json文件
wget http://hl7-fhir.github.io/all-valuesets.zip unzip all-valuesets.zip rm all-valuesets.zip rm *.xml wget http://hl7-fhir.github.io/search-parameters.json wget http://hl7-fhir.github.io/profiles-resources.json wget http://hl7-fhir.github.io/profiles-types.json
https://github.com/ga4gh/schemas 这里是使用avro来定义基因数据的格式 但定义的时候走的是IDL .AVDL
文件 并非.AVSC文件
https://github.com/sameerbhadouria/avdl2avsc-maven-plugin 这个工具科研把avdl转化成avsc文件
avro schema的演化 1、http://www.cnblogs.com/fxjwind/archive/2013/05/14/3078041.html avro对于schema演化的支持 2、Default values are a must when using schema evolution. If you do not provide a default value for a field that is present in the reader schema, but not in the writer schema, Avro can't figure out how to create this new field in the parsed structure 3、http://martin.kleppmann.com/2012/12/05/schema-evolution-in-avro-protocol-buffers-thrift.html http://www.cnblogs.com/fxjwind/archive/2013/05/14/3078041.html 阿里的数据大牛翻译了这篇博客
ga4gh/schemas#344 (comment)
after some digging,I found some useful links 1、example for how to combine two separate avro schema to fix the reusable problem,how to define optional field in avro schema 2、Can I split an Apache Avro schema across multiple files?