-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit-template.yaml
373 lines (360 loc) · 13.3 KB
/
edit-template.yaml
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# it is important to use this apiVersion
apiVersion: witboost.com/v1
kind: EditTemplate
metadata:
name: edit-snowflake-outputport-template.1
title: Edit Snowflake Output Port
description: Edit a Snowflake Output Port of a Data Product
tags:
- edit
- snowflake
- outputport
spec:
owner: agile_lab
useCaseTemplateId:
- urn:dmb:utm:snowflake-outputport-template:0.0.0
parameters:
- title: Update Snowflake Output Port
description: |
This wizard will allow you to edit the metadata for a previously created Snowflake Output Port.
Most metadata is editable but some (like the name, domain, data product etc) are not; their fields will be read-only.
Some of the files in the component's repository cannot be updated by this wizard, namely:
- **Documentation**: `README.md`, `docs/index.md`, etc
- **CI/CD**: `.gitlab-ci-yaml`
You need to take care of updating these yourself, as given their nature it's hard to do automatically and they are often edited manually after the component's creation.
- title: Update component metadata
description: update basic information for this component.
required:
- description
properties:
name:
title: Name
type: string
description: Not editable. The name of the component.
ui:disabled: true
description:
title: Description
type: string
description: Required. Help others understand what this component is for. What data will it expose?
domain:
title: Domain
type: string
description: Not editable. Domain of the Data Product this component belongs to
ui:field: EntityPicker
ui:options:
allowArbitraryValues: false
allowedKinds:
- Domain
ui:disabled: true
dataproduct:
title: Data Product
type: string
description: Not editable. Data Product this component belongs to
ui:field: EntityPicker
ui:filter:
- fieldName: domain
entityPath: spec.domain
ui:options:
allowArbitraryValues: false
allowedKinds:
- System
ui:disabled: true
identifier:
title: Identifier
type: string
description: Autogenerated from the information above. A unique identifier for the component. It will not be editable after creation and is a string composed of [a-zA-Z] separated by any of [-_].
ui:field: ComponentIdentifierPicker
ui:options:
allowArbitraryValues: false
developmentGroup:
title: Development Group
type: string
description: Automatically selected from the Data Product metadata. Data Product development group.
ui:field: EntitySelectionPicker
ui:fieldName: dataproduct
ui:property: spec.owner
ui:options:
allowArbitraryValues: false
dependsOn:
title: Dependencies
type: array
description: A component could depend on other components in the same Data Product. This information will be used to deploy the components in such an order that their dependencies already exist.
default: []
items:
type: string
ui:field: EntityComponentsPicker
ui:componentsFilter: storage
ui:fieldName: dataproduct
ui:options:
allowArbitraryValues: false
tags:
title: Tags
type: array
description: Tags for the component
default: []
items:
type: string
- title: Update Terms & Conditions and SLA
description: Update Terms & Conditions and Service Level Agreement information for this Data product.
required:
- termsAndConditions
- intervalOfChange
- timeliness
- upTime
properties:
termsAndConditions:
title: Terms and Conditions
type: string
description: Required. Terms and Conditions that apply to the data.
default: Can be used for production purposes.
intervalOfChange:
title: Interval of change
type: string
description: Required. How often the data is refreshed.
default: 2BD
timeliness:
title: Timeliness
type: string
description: Required. Timeliness of the data.
default: 2BD
upTime:
title: Uptime
type: string
description: Required. Uptime of the Output Port.
default: 99.9%
- title: Update Data Sharing Agreement
description: Update the Data Sharing Agreement clauses for this Data product.
required:
- purpose
- billing
- security
- intendedUsage
- limitations
- lifeCycle
- confidentiality
properties:
purpose:
title: Purpose
type: string
description: Required. Purpose of the data.
default: Foundational data for downstream sue cases.
billing:
title: Billing
type: string
description: Required. Billing applied to data usage.
default: None.
security:
title: Security
type: string
description: Required. Security policies that apply to the data.
default: Platform standard security policies.
intendedUsage:
title: Intended Usage
type: string
description: Required. Intended usage for the data.
default: Any downstream use cases.
limitations:
title: Limitations
type: string
description: Required. Limitations of the data.
default: Needs joining with other datasets (eg customer data) for most analytical use cases.
lifeCycle:
title: Lifecycle
type: string
description: Required. Lifecycle of the data.
default: Data loaded every two days and typically never deleted.
confidentiality:
title: Confidentiality
type: string
description: Required. Confidentiality of the data.
default: None.
- title: Update Output Port deployment information
required:
- underlyingStorage
- tableName
- viewName
properties:
hiddenKind:
type: string
default: storage
ui:widget: hidden
ui:disabled: true
underlyingStorage:
title: Storage Area
type: object
ui:field: EntityPicker
ui:fieldName: dataproduct
ui:options:
allowArbitraryValues: false
storeRawEntity: true # this is the key property that does the magic
allowedKinds:
- Component
ui:filter:
- fieldName: dataproduct
entityPath: spec.system
- fieldName: hiddenKind
entityPath: spec.type
description: An Output Port has to get data from a Storage Area in the same Data Product
database:
title: Database
type: string
description: Name of the Database in Snowflake. If not provided, the default value (In this case, domain name) will be assigned during the creation.
ui:field: RegexPicker
validation:
errorMessage: The database name should contain only alphabetic characters or "_"
regularExpression: ^[a-zA-Z_]*$
schema:
title: Schema
type: string
description: Name of the Schema inside a Snowflake database. If not provided, the default value (In this case, dpname_dpversion) will be assigned during the creation.
ui:field: RegexPicker
validation:
errorMessage: The schema name should contain only alphabetic characters or "_"
regularExpression: ^[a-zA-Z_]*$
tableName:
type: object
ui:field: DescriptorPicker
title: Table Name
description: Choose a table from the ones defined by the Storage Area above. This is where the Output Port view will get its data.
sourceType: field
source: underlyingStorage
optionsAt: spec.mesh.specific.tables
optionsDisplayNameAt: tableName
viewName:
title: View name
type: string
description: Name of the view that will be created inside the Snowflake Schema
ui:field: RegexPicker
validation:
errorMessage: The view name should contain only alphabetic characters or "_"
regularExpression: ^[a-zA-Z_]+$
- title: Update View Schema
description: Update the definition of the columns of the view.
properties:
schemaColumns:
title: Column Definitions
type: array
ui:ArrayFieldTemplate: ArrayTableTemplate
items:
type: object
ui:ObjectFieldTemplate: TableRowTemplate
required:
- name
- dataType
properties:
name:
type: string
title: Name
description:
type: string
title: Description
dataType:
type: string
default: TEXT
title: Data Type
enum:
- TEXT
- NUMBER
- DATE
- BOOLEAN
constraint:
type: string
title: Constraint
default: (no constraint)
enum:
- PRIMARY_KEY
- NOT_NULL
- UNIQUE
- (no constraint)
allOf:
- if:
properties:
dataType:
oneOf:
- const: TEXT
then:
properties:
dataLength:
title: Column Length
type: integer
description: Maximum length of the text
default: 16777216
required:
- dataLength
- if:
properties:
dataType:
oneOf:
- const: NUMBER
then:
properties:
precision:
title: Precision
type: integer
description: Precision of the numeric data type
minimum: 1
maximum: 38
default: 38
scale:
title: Scale
type: integer
description: Scale of the numeric data type; cannot be greater than precision minus 1
minimum: 0
maximum: 37
default: 0
required:
- precision
- scale
- if: true
then:
properties:
businessTerms:
title: Business Terms
type: array
description: Multiple selection for fixed tags
uniqueItems: true
ui:style:
minWidth: 400
items:
type: string
enum:
- Raw
- Derived
- Metadata
- Identifier
- Dimension
- Fact
piiCheck:
title: PII
type: boolean
steps:
- id: template
name: Fetch Skeleton + Template
action: fetch:template
input:
url: ./edit-skeleton
targetPath: .
values:
description: '${{ parameters.description }}'
domain: '${{ parameters.domain }}'
dataproduct: '${{ parameters.dataproduct }}'
identifier: '${{ parameters.identifier }}'
developmentGroup: '${{ parameters.developmentGroup }}'
dependsOn: '${{ parameters.dependsOn }}'
tags: '${{ parameters.tags }}'
termsAndConditions: '${{ parameters.termsAndConditions }}'
intervalOfChange: '${{ parameters.intervalOfChange }}'
timeliness: '${{ parameters.timeliness }}'
upTime: '${{ parameters.upTime }}'
purpose: '${{ parameters.purpose }}'
billing: '${{ parameters.billing }}'
security: '${{ parameters.security }}'
intendedUsage: '${{ parameters.intendedUsage }}'
limitations: '${{ parameters.limitations }}'
lifeCycle: '${{ parameters.lifeCycle }}'
confidentiality: '${{ parameters.confidentiality }}'
database: '${{ parameters.database }}'
schema: '${{ parameters.schema }}'
tableName: '${{ parameters.tableName.value.tableName }}'
viewName: '${{ parameters.viewName }}'
schemaColumns: '${{ parameters.schemaColumns }}'