Protobuf records schema
All proto records emitted by a parser have target Type, defined at parser creation time. All Types are based on an Archetype, and the Archetype is defined at Type creation time.
The Archetype base schema and additional Type-level configurations, such as the data field schema and metadata bucket references, define the schema to which individual records emitted by a parser must conform.
Schemas make dynamic references to the user-defined schemas at Type-level.
Numeric Archetype family
The following is an example of a schema for proto records in the Numeric Archetype family.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Proto record schema for parsers targeting the Numeric archetype family",
"type": "object",
"properties": {
"tagName": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"numeric": {
"type": "number"
}
},
"description": "Numeric measurement",
"required": ["numeric"]
},
"embeddedMetadata": {
"type": "object",
"description": "Rapidly changing metadata"
},
"cloudMetadata": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"bucketReference": {
"type": "object",
"properties": {
"bucketName": {
"type": "string"
},
"version": {
"type": "number"
}
},
"required": ["bucketName", "version"]
},
"naturalKey": {
"type": "string"
}
},
"required": ["bucketReference", "naturalKey"]
},
{
"type": "object",
"properties": {
"bucketReference": {
"type": "object",
"properties": {
"bucketName": {
"type": "string"
},
"version": {
"type": "number"
}
},
"required": ["bucketName", "version"]
},
"instance": {
"type": "object",
"description": "The metadata instance",
"properties": {
"naturalKey": {
"type": "string"
},
"attributes": {
"$ref": "<Dynamic reference to the schema of the metadata bucket version>"
}
},
"required": ["attributes"]
}
},
"required": ["bucketReference", "instance"]
}
]
}
},
"timestamps": {
"type": "object",
"properties": {
"eventTimestamp": {
"type": "number",
"description": "Event timestamp",
"format": "unix-epoch-millis"
}
},
"required": ["eventTimestamp"]
},
"clusterFields": {
"type": "object",
"description": "Optional fields for types of Cluster archetype",
"properties": {
"clusteredColumn1": {
"type": "string"
},
"clusteredColumn2": {
"type": "string"
},
"clusteredColumn3": {
"type": "string"
},
"clusteredColumn4": {
"type": "string"
}
}
}
},
"required": ["tagName", "data", "timestamps"]
}
Discrete Archetype family
The following is an example of a proto record schema for parsers targeting Types in the Discrete archetype family.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Proto record schema for parsers targeting the Discrete archetype family",
"type": "object",
"properties": {
"tagName": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"complex": {
"$ref": "<Dynamic reference to the data field schema of the type version>"
}
},
"required": ["complex"]
},
"embeddedMetadata": {
"type": "object",
"description": "Rapidly changing metadata"
},
"cloudMetadata": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"bucketReference": {
"type": "object",
"properties": {
"bucketName": {
"type": "string"
},
"version": {
"type": "number"
}
},
"required": ["bucketName", "version"]
},
"naturalKey": {
"type": "string"
}
},
"required": ["bucketReference", "naturalKey"]
},
{
"type": "object",
"properties": {
"bucketReference": {
"type": "object",
"properties": {
"bucketName": {
"type": "string"
},
"version": {
"type": "number"
}
},
"required": ["bucketName", "version"]
},
"instance": {
"type": "object",
"description": "The metadata instance",
"properties": {
"naturalKey": {
"type": "string"
},
"attributes": {
"$ref": "<Dynamic reference to the schema of the metadata bucket version>"
}
},
"required": ["attributes"]
}
},
"required": ["bucketReference", "instance"]
}
]
}
},
"timestamps": {
"type": "object",
"properties": {
"eventTimestamp": {
"type": "number",
"description": "Event timestamp",
"format": "unix-epoch-millis"
}
},
"required": ["eventTimestamp"]
},
"clusterFields": {
"type": "object",
"description": "Optional fields for types of Cluster archetype",
"properties": {
"clusteredColumn1": {
"type": "string"
},
"clusteredColumn2": {
"type": "string"
},
"clusteredColumn3": {
"type": "string"
},
"clusteredColumn4": {
"type": "string"
}
}
}
},
"required": ["tagName", "data", "timestamps"]
}
Continuous Archetype family
The following is an example of a proto record schema for parsers targeting types in the Continuous Archetype family.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Proto record schema for parsers targeting the Discrete archetype family",
"type": "object",
"properties": {
"tagName": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"complex": {
"$ref": "<Dynamic reference to the data field schema of the type version>"
}
},
"required": ["complex"]
},
"embeddedMetadata": {
"type": "object",
"description": "Rapidly changing metadata"
},
"cloudMetadata": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"bucketReference": {
"type": "object",
"properties": {
"bucketName": {
"type": "string"
},
"version": {
"type": "number"
}
},
"required": ["bucketName", "version"]
},
"naturalKey": {
"type": "string"
}
},
"required": ["bucketReference", "naturalKey"]
},
{
"type": "object",
"properties": {
"bucketReference": {
"type": "object",
"properties": {
"bucketName": {
"type": "string"
},
"version": {
"type": "number"
}
},
"required": ["bucketName", "version"]
},
"instance": {
"type": "object",
"description": "The metadata instance",
"properties": {
"naturalKey": {
"type": "string"
},
"attributes": {
"$ref": "<Dynamic reference to the schema of the metadata bucket version>"
}
},
"required": ["attributes"]
}
},
"required": ["bucketReference", "instance"]
}
]
}
},
"timestamps": {
"type": "object",
"properties": {
"continuousTimestamp": {
"type": "object",
"properties": {
"eventTimestampStart": {
"type": "number",
"description": "Event start timestamp",
"format": "unix-epoch-millis"
},
"eventTimestampEnd": {
"type": "number",
"description": "Event end timestamp",
"format": "unix-epoch-millis"
}
},
"required": ["eventTimestampStart", "eventTimestampEnd"]
}
},
"required": ["continuousTimestamp"]
},
"clusterFields": {
"type": "object",
"description": "Optional fields for types of Cluster archetype",
"properties": {
"clusteredColumn1": {
"type": "string"
},
"clusteredColumn2": {
"type": "string"
},
"clusteredColumn3": {
"type": "string"
},
"clusteredColumn4": {
"type": "string"
}
}
}
},
"required": ["tagName", "data", "timestamps"]
}