-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathdata-product-specification.cue
227 lines (213 loc) · 6.75 KB
/
data-product-specification.cue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
package generic_dp
// All the data types that starts with OM_ are imported from OpenMetadata definitions
import "strings"
#Version: string & =~"^[0-9]+\\.[0-9]+\\..+$"
#Id: string & =~"^[a-zA-Z0-9:._-]+$"
#DataProductId: #Id & =~"^urn:dmb:dp:\(domain):[a-zA-Z0-9_-]+:\(majorVersion)$"
#ComponentId: #Id & =~"^urn:dmb:cmp:\(domain):[a-zA-Z0-9_-]+:\(majorVersion):[a-zA-Z0-9_-]+$"
#URL: string & =~"^https?://[a-zA-Z0-9@:%._~#=&/?]*$"
#OM_DataType: string & =~"(?i)^(NUMBER|TINYINT|SMALLINT|INT|BIGINT|BYTEINT|BYTES|FLOAT|DOUBLE|DECIMAL|NUMERIC|TIMESTAMP|TIME|DATE|DATETIME|INTERVAL|STRING|MEDIUMTEXT|TEXT|CHAR|VARCHAR|BOOLEAN|BINARY|VARBINARY|ARRAY|BLOB|LONGBLOB|MEDIUMBLOB|MAP|STRUCT|UNION|SET|GEOGRAPHY|ENUM|JSON)$"
#OM_Constraint: string & =~"(?i)^(NULL|NOT_NULL|UNIQUE|PRIMARY_KEY)$"
#OM_TableData: {
columns: [... string]
rows: [... [...]]
}
#OM_Tag: {
tagFQN: string
description?: string | null
source: string & =~"(?i)^(Tag|Glossary)$"
labelType: string & =~"(?i)^(Manual|Propagated|Automated|Derived)$"
state: string & =~"(?i)^(Suggested|Confirmed)$"
href?: string | null
}
#OM_Column: {
name: string
dataType: #OM_DataType
if dataType =~ "(?i)^(ARRAY)$" {
arrayDataType: #OM_DataType
}
if dataType =~ "(?i)^(CHAR|VARCHAR|BINARY|VARBINARY)$" {
dataLength: number
}
dataTypeDisplay?: string | null
description?: string | null
fullyQualifiedName?: string | null
tags?: [... #OM_Tag]
businessTerms?: [... #OM_Tag]
constraint?: #OM_Constraint | null
ordinalPosition?: number | null
if dataType =~ "(?i)^(JSON)$" {
jsonSchema: string
}
if dataType =~ "(?i)^(MAP|STRUCT|UNION)$" {
children: [... #OM_Column]
}
}
#DataContract: {
schema: [... #OM_Column]
SLA: {
intervalOfChange?: string | null
timeliness?: string | null
upTime?: string | null
...
}
endpoint?: #URL | null
dataSharingAgreement: #DataSharingAgreement
...
}
#DataSharingAgreement: {
termsAndConditions?: string | null
purpose?: string | null
billing?: string | null
security?: string | null
intendedUsage?: string | null
limitations?: string | null
lifeCycle?: string | null
confidentiality?: string | null
...
}
#OutputPort: {
id: #ComponentId
name: string
fullyQualifiedName?: string | null
description: string
version: #Version & =~"^\(majorVersion)+\\..+$"
infrastructureTemplateId: string
useCaseTemplateId?: string | null
dependsOn: [...#ComponentId]
platform?: string | null
technology?: string | null
outputPortType: string
creationDate?: string | null
startDate?: string | null
retentionTime?: string | null
processDescription?: string | null
dataContract: #DataContract
biTempBusinessTs?: string | null
biTempWriteTs?: string | null
tags: [... #OM_Tag]
sampleData?: #OM_TableData | null
sampleQuery?: string | null
semanticLinking?: {...} | null
specific: {...}
...
}
#Workload: {
id: #ComponentId
name: string
fullyQualifiedName?: string | null
description: string
version: #Version & =~"^\(majorVersion)+\\..+$"
infrastructureTemplateId: string
useCaseTemplateId?: string | null
dependsOn: [...#ComponentId]
platform?: string | null
technology?: string | null
workloadType?: string | null
connectionType?: string & =~"(?i)^(housekeeping|datapipeline)$" | null
tags: [... #OM_Tag]
readsFrom: [... string]
specific: {...} | null
...
}
#Storage: {
id: #ComponentId
name: string
fullyQualifiedName?: string | null
description: string
version: #Version & =~"^\(majorVersion)+\\..+$"
owners: [...string]
infrastructureTemplateId: string
useCaseTemplateId?: string | null
dependsOn: [...#ComponentId]
platform?: string | null
technology?: string | null
storageType?: string | null
tags: [... #OM_Tag]
specific: {...} | null
...
}
#Observability: {
id: #ComponentId
name: string
fullyQualifiedName: string
description: string
version: #Version & =~"^\(majorVersion)+\\..+$"
infrastructureTemplateId: string
useCaseTemplateId?: string | null
dependsOn: [...#ComponentId]
endpoint: #URL
completeness: {...} | null
dataProfiling: {...} | null
freshness: {...} | null
availability: {...} | null
dataQuality: {...} | null
specific: {...} | null
...
}
#Component: {
kind: string & =~"(?i)^(outputport|workload|storage|observability)$"
if kind != _|_ {
if kind =~ "(?i)^(outputport)$" {
#OutputPort
}
if kind =~ "(?i)^(workload)$" {
#Workload
}
if kind =~ "(?i)^(storage)$" {
#Storage
}
if kind =~ "(?i)^(observability)$" {
#Observability
}
}
...
}
id: #DataProductId
name: string
fullyQualifiedName?: string | null
description: string
kind: string & =~"(?i)^(dataproduct)$"
domain: string
version: #Version
let majorVersion = strings.Split(version, ".")[0]
environment: string
dataProductOwner: string
dataProductOwnerDisplayName: string
devGroup: string
ownerGroup: string
email?: string | null
supportSLA: {
supportHours: string | null
responseTime: string | null
resolutionTime: string | null
informationTime: string | null
endOfSupport: string | null
}
status?: string & =~"(?i)^(draft|published|retired)$" | null
maturity?: string & =~"(?i)^(tactical|strategic)$" | null
billing?: {...} | null
businessInfo: {
valueProposition: string | null
valueGeneration?: string & =~"(?i)^(Foundation|RevenueGeneration|OperationMonitoring)$" | null
strategicInitiatives: [... string] | null
stakeholderRoles: [... string] | null
pricingType: string & =~"(?i)^(PayPerUse|Subscription)$" | null
pricingInfo: {...} | null
...
}
securityInfo: {
confidentiality: string & =~"(?i)^(Public|Internal|Confidential|Restricted|Secret)$"| null
visibility: string & =~"(?i)^(Global|Department)$" | null
GDPR: string & =~"(?i)^(Yes|No)$" | null
...
}
contacts: {
ownerContact: string
suportContact: string
}
targetConsumption: [... string] | null
tags: [... #OM_Tag]
businessConcepts: [... #OM_Tag]
specific: {...}
components: [#Component, ...#Component]