-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit-template.yaml
255 lines (245 loc) · 9.26 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
# it is important to use this apiVersion
apiVersion: witboost.com/v1
kind: EditTemplate
metadata:
name: edit-snowflake-storage-template.1
title: Edit Snowflake Storage Area
description: Edit a Snowflake Storage Area of a Data Product
tags:
- edit
- snowflake
- storage
spec:
owner: agile_lab
useCaseTemplateId:
- urn:dmb:utm:snowflake-storage-template:0.0.0
parameters:
- title: Update Snowflake Storage Area
description: |
This wizard will allow you to edit the metadata for a previously created Snowflake Storage Area.
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 contain?
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.
**Warning**: be careful not to select this component as its own dependency, otherwise it will become undeployable until you edit it again and remove that circular dependency.
default: []
items:
type: string
ui:field: EntityComponentsPicker
ui:fieldName: dataproduct
ui:options:
allowArbitraryValues: false
tags:
title: Tags
type: array
description: Tags for the component
default: []
items:
type: string
- title: Update Snowflake deployment information
description: Update deployment information for this component, namely its location in Snowflake.
required:
- tableName
properties:
database:
title: Snowflake Database
type: string
description: Name of the database in Snowflake. If not provided, a default value (the Domain name, in uppercase) 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: Snowflake Schema
type: string
description: Name of the schema inside the Snowflake database above. If not provided, the default value (the Data Product name ands its major version, separated by _ and in uppercase) 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:
title: Table Name
type: string
description: Required. Name of the table inside the Snowflake schema above.
ui:field: RegexPicker
validation:
errorMessage: The table name should contain only alphabetic characters or "_"
regularExpression: ^[a-zA-Z_]+$
- title: Update Table Schema
description: Update the definition of the columns of the table.
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:
name: '${{ parameters.name }}'
description: '${{ parameters.description }}'
domain: '${{ parameters.domain }}'
dataproduct: '${{ parameters.dataproduct }}'
identifier: '${{ parameters.identifier }}'
developmentGroup: '${{ parameters.developmentGroup }}'
dependsOn: '${{ parameters.dependsOn }}'
tags: '${{ parameters.tags }}'
database: '${{ parameters.database }}'
schema: '${{ parameters.schema }}'
tableName: '${{ parameters.tableName }}'
schemaColumns: '${{ parameters.schemaColumns }}'