Skip to content

Instantly share code, notes, and snippets.

@jairo-henao
Last active September 23, 2019 19:52
Show Gist options
  • Save jairo-henao/f4e6cd8242b326d064d8988c97a02b50 to your computer and use it in GitHub Desktop.
Save jairo-henao/f4e6cd8242b326d064d8988c97a02b50 to your computer and use it in GitHub Desktop.
Schema of flattened data
{
"type": "object",
"properties" : {
"id" : {
"type" : "string",
"$comment" : "Used to identify the record, it is usually the ID assigned by the source system"
},
"contentType" : {
"type" : "string",
"$comment" : "Name of data type represented. Used to determine the name of table in UPSERTs commands"
},
"source" : {
"type" : "string",
"enum" : [ "jira", "rally", "snow" ],
"$comment" : "Source system name. Used to store the detailed fields of each record"
},
"fields" : {
"type" : "array",
"items" : {
"type": "object",
"properties" : {
"name" : { "type": "string" },
"dataType" : { "type" : "string", "enum" : ["number", "date", "timestamp", "boolean", "list"] },
"format" : { "type": "string" },
"value" : { "type": "string" },
"listValues" : { "type": "array" },
"$comment" : "Detail of each field. 'string' is the dataType assumed by default. The format is required only for dates and numbers. The 'listValues' is required only for 'list'"
},
"required": ["name", "value"]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment