Commit e3621a30 authored by Dmitry Kniazev's avatar Dmitry Kniazev
Browse files

Adding stream dataset schema definition and example

parent 8e214b55
{
"id": "opendes:dataset--Stream.Generic:4dc4e8ec354e4953b6968fcb1d9d9f38",
"kind": "osdu:wks:dataset--Stream.Generic:1.0.0",
"acl": {
"owners": [
"data.stream-4dc4e8ec354e4953b6968fcb1d9d9f38.producers@opendes.contoso.com"
],
"viewers": [
"data.stream-4dc4e8ec354e4953b6968fcb1d9d9f38.consumers@opendes.contoso.com"
]
},
"legal": {
"legaltags": [
"opendes-public-usa-dataset-epam"
],
"otherRelevantDataCountries": [
"US"
],
"status": "compliant"
},
"tags": {
"env": "dev-azure"
},
"ancestry": {
"parents": []
},
"meta": [],
"data": {
"ResourceSecurityClassification": "namespace:reference-data--ResourceSecurityClassification:RESTRICTED:",
"Source": "Contoso Inc.",
"Name": "Example Well Log Kafka Stream",
"Description": "This stream follows data for one Well Log and routes it from source to sink with no additional filtering",
"TotalSize": "0",
"EncodingFormatTypeID": "namespace:reference-data--EncodingFormatType:text%2Fjson:",
"SchemaFormatTypeID": "namespace:reference-data--SchemaFormatType:WITSML2:",
"Endian": "BIG",
"DatasetProperties": {
"StreamType": "PROCESSOR",
"StreamDefinition": {
"SubscribeIds": [
"opendes:work-product-component--WellLog:be54a691c0384182944d71c6b2b6f699"
],
"SourceBindings": [
"opendes_wks_work-product-component--WellLog_1.0.0"
],
"SinkBindings": [
"opendes_4dc4e8ec354e4953b6968fcb1d9d9f38_work-product-component--WellLog_1.0.0"
],
"Filter": "TBD",
"Aggregate": "TBD"
}
},
"ExtensionProperties": {}
}
}
\ No newline at end of file
{
"schemaInfo": {
"schemaIdentity": {
"authority": "{{schema-authority}}",
"source": "wks",
"entityType": "AbstractStream",
"schemaVersionMajor": 1,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": "{{schema-authority}}:wks:AbstractStream:1.0.0"
},
"createdBy": "OSDU Data Definition Group",
"scope": "SHARED",
"status": "DEVELOPMENT"
},
"schema": {
"x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.",
"x-osdu-review-status": "Proposed",
"$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractStream.1.0.0.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"x-osdu-schema-source": "osdu:wks:AbstractStream:1.0.0",
"title": "AbstractStream",
"description": "The schema fragment representing a stream",
"type": "object",
"properties": {
"DatasetProperties": {
"type": "object",
"title": "Dataset Properties",
"description": "The dataset properties for a single stream.",
"properties": {
"StreamType": {
"type": "string",
"description": "Type of the stream. Enumeration: \"SOURCE\", \"PROCESSOR\", \"SINK\"",
"enum": [
"SOURCE",
"PROCESSOR",
"SINK"
]
},
"StreamDefinition": {
"$ref": "{{schema-authority}}:wks:AbstractStreamDefinition:1.0.0",
"title": "Stream Definition",
"description": "Generic Stream Definition."
}
}
}
},
"required": [
"DatasetProperties"
],
"x-osdu-inheriting-from-kind": []
}
}
\ No newline at end of file
{
"schemaInfo": {
"schemaIdentity": {
"authority": "{{schema-authority}}",
"source": "wks",
"entityType": "AbstractStreamDefinition",
"schemaVersionMajor": 1,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": "{{schema-authority}}:wks:AbstractStreamDefinition:1.0.0"
},
"createdBy": "OSDU Data Definition Group",
"scope": "SHARED",
"status": "DEVELOPMENT"
},
"schema": {
"x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.",
"x-osdu-review-status": "Proposed",
"$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractStreamDefinition.1.0.0.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"x-osdu-schema-source": "osdu:wks:AbstractStreamDefinition:1.0.0",
"title": "AbstractStreamDefinition",
"description": "A schema fragment to describe stream definition.",
"type": "object",
"properties": {
"SubscribeIds": {
"type": "array",
"title": "List of SubscribeIDs",
"description": "List of Ids of the OSDU records for which the stream will be listening for messages. This property is required.",
"items": {
"type": "string",
"example": "opendes:work-product-component--WellLog:be54a691c0384182944d71c6b2b6f699"
}
},
"SourceBindings": {
"type": "array",
"title": "List of Source Bindings",
"description": "List of sources to listen for new messages. If not explicitely provided, then the streams admin service can make an attempt to derive them from other parameters.",
"items": {
"type": "string",
"example": "opendes_wks_work-product-component--WellLog_1.0.0"
}
},
"SinkBindings": {
"type": "array",
"title": "List of Sink Bindings",
"description": "List of sinks to route output messages to after the stream processing. If not explicitely provided, then the stream admin service will create a new sink.",
"items": {
"type": "string",
"example": "opendes_4dc4e8ec354e4953b6968fcb1d9d9f38_work-product-component--WellLog_1.0.0"
}
},
"Filter": {
"type": "string",
"title": "Stream Filter",
"description": "Filtering clause for the processor stream. Syntax is TBD"
},
"Aggregate": {
"type": "string",
"title": "Stream Aggregator",
"description": "Aggregation definition for the processor stream. Syntax is TBD"
}
},
"required": [
"SubscribeIds"
],
"x-osdu-inheriting-from-kind": []
}
}
\ No newline at end of file
{
"schemaInfo": {
"schemaIdentity": {
"authority": "{{schema-authority}}",
"source": "wks",
"entityType": "dataset--Stream.Generic",
"schemaVersionMajor": 1,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": "{{schema-authority}}:wks:dataset--Stream.Generic:1.0.0"
},
"createdBy": "OSDU Data Definition Group",
"scope": "SHARED",
"status": "DEVELOPMENT"
},
"schema": {
"x-osdu-license": "Copyright 2021, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.",
"$id": "https://schema.osdu.opengroup.org/json/dataset/Stream.Generic.1.0.0.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"x-osdu-schema-source": "osdu:wks:dataset--Stream.Generic:1.0.0",
"title": "Stream.Generic",
"description": "The Generic Stream template.",
"type": "object",
"properties": {
"id": {
"description": "Previously called ResourceID or SRN which identifies this OSDU resource object without version.",
"title": "Entity ID",
"type": "string",
"pattern": "^[\\w\\-\\.]+:dataset\\-\\-Stream.Generic:[\\w\\-\\.\\:\\%]+$",
"example": "namespace:dataset--Stream.Generic:7c6c0a0d-9e6d-5087-bed9-106233ba57ea"
},
"kind": {
"description": "The schema identification for the OSDU resource object following the pattern {Namespace}:{Source}:{Type}:{VersionMajor}.{VersionMinor}.{VersionPatch}. The versioning scheme follows the semantic versioning, https://semver.org/.",
"title": "Entity Kind",
"type": "string",
"pattern": "^[\\w\\-\\.]+:[\\w\\-\\.]+:[\\w\\-\\.]+:[0-9]+.[0-9]+.[0-9]+$",
"example": "osdu:wks:dataset--Stream.Generic:1.0.0"
},
"version": {
"description": "The version number of this OSDU resource; set by the framework.",
"title": "Version Number",
"type": "integer",
"format": "int64",
"example": 1562066009929332
},
"acl": {
"description": "The access control tags associated with this entity.",
"title": "Access Control List",
"$ref": "{{schema-authority}}:wks:AbstractAccessControlList:1.0.0"
},
"legal": {
"description": "The entity's legal tags and compliance status. The actual contents associated with the legal tags is managed by the Compliance Service.",
"title": "Legal Tags",
"$ref": "{{schema-authority}}:wks:AbstractLegalTags:1.0.0"
},
"tags": {
"title": "Tag Dictionary",
"description": "A generic dictionary of string keys mapping to string value. Only strings are permitted as keys and values.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"NameOfKey": "String value"
}
},
"createTime": {
"description": "Timestamp of the time at which initial version of this OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.",
"title": "Resource Object Creation DateTime",
"type": "string",
"format": "date-time",
"example": "2020-12-16T11:46:20.163Z"
},
"createUser": {
"title": "Resource Object Creation User Reference",
"description": "The user reference, which created the first version of this resource object. Set by the System.",
"type": "string",
"example": "some-user@some-company-cloud.com"
},
"modifyTime": {
"description": "Timestamp of the time at which this version of the OSDU resource object was created. Set by the System. The value is a combined date-time string in ISO-8601 given in UTC.",
"title": "Resource Object Version Creation DateTime",
"type": "string",
"format": "date-time",
"example": "2020-12-16T11:52:24.477Z"
},
"modifyUser": {
"title": "Resource Object Version Creation User Reference",
"description": "The user reference, which created this version of this resource object. Set by the System.",
"type": "string",
"example": "some-user@some-company-cloud.com"
},
"ancestry": {
"description": "The links to data, which constitute the inputs.",
"title": "Ancestry",
"$ref": "{{schema-authority}}:wks:AbstractLegalParentList:1.0.0"
},
"meta": {
"description": "The Frame of Reference meta data section linking the named properties to self-contained definitions.",
"title": "Frame of Reference Meta Data",
"type": "array",
"items": {
"$ref": "{{schema-authority}}:wks:AbstractMetaItem:1.0.0"
}
},
"data": {
"allOf": [
{
"$ref": "{{schema-authority}}:wks:AbstractCommonResources:1.0.0"
},
{
"$ref": "{{schema-authority}}:wks:AbstractDataset:1.0.0"
},
{
"$ref": "{{schema-authority}}:wks:AbstractStream:1.0.0"
},
{
"type": "object",
"properties": {}
},
{
"type": "object",
"properties": {
"ExtensionProperties": {
"type": "object"
}
}
}
]
}
},
"required": [
"kind",
"acl",
"legal"
],
"additionalProperties": false,
"x-osdu-review-status": "Proposed",
"x-osdu-inheriting-from-kind": [
{
"name": "Dataset",
"kind": "osdu:wks:AbstractDataset:1.0.0"
},
{
"name": "File",
"kind": "osdu:wks:AbstractStream:1.0.0"
}
]
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment