A Data Model
describes properties of a Table.
The Data Model format follows JSON-Schema Draft 7.
Data Model properties
describe attributes of Tables (e.g. a "subject" table may have an "age" property).
Properties can be defined:
inline
orexternally
by referencing a JSON-Schema definition
Here are sample Data Model definitions. For more information, visit the JSON-Schema website.
This data model has one property, age
, defined inline:
{
"data_model": {
"properties": {
"age" : {
"description": "age of a subject, in whole years",
"type": "number"
}
}
}
}
This data model defines its sole property, drs
, by referring to an external data model: the Data Repository Service developed by the GA4GH Cloud Work Stream:
{
"data_model": {
"properties": {
"drs": {
"$ref": "http://schema.ga4gh.org/drs/0.1.0#/definitions/Object"
}
}
}
}
This data model that contains both inline and externally referenced properties:
{
"data_model": {
"description": "A collection of subjects and their data objects",
"properties": {
"subject": {
"type":"object",
"properties": {
"id": {
"description": "anonymous identifier of a subject",
"type": "string"
},
"age": {
"description": "age of a subject, in whole years",
"type": "number"
}
}
},
"drs": {
"$ref": "http://schema.ga4gh.org/drs/0.1.0#/definitions/Object"
}
}
}
}