-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
271 lines (271 loc) · 9.46 KB
/
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
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: snowflake-workload-airbyte-template.1
title: Workload Airbyte Template
description: Create a repository containing the definition of a Airbyte Workload
mesh:
icon: https://marketplace.digitalocean.com/_next/image?url=https%3A%2F%2Fmarketplace-assets.digitalocean.com%2Flogos%2Fairbyte.png&w=3840&q=75
tags:
- snowflake
- airbyte
- workload
spec:
generates: componenttype:default/workload
owner: agilelab
type: workload
parameters:
- title: Component basic information
required:
- name
- domain
- dataproduct
- description
properties:
name:
title: Name
type: string
description: Required name used for display purposes
ui:field: EntityNamePicker
default: Airbyte Workload
ui:options:
allowArbitraryValues: true
description:
title: Description
type: string
description: Help others understand what this Workload is for
domain:
title: Domain
type: string
description: Domain of the Data Product this Workload belongs to
ui:field: EntityPicker
ui:options:
allowArbitraryValues: false
allowedKinds:
- Domain
dataproduct:
title: Data Product
type: string
description: Data Product this Workload belongs to
ui:field: EntityPicker
ui:filter:
- fieldName: domain
entityPath: spec.domain
ui:options:
allowArbitraryValues: false
allowedKinds:
- System
identifier:
title: Identifier
type: string
description: A unique identifier for the entity inside the domain. It will not
be editable after creation and is expected to be a string that is
sequences of [a-zA-Z] separated by any of [-_]. An example could be
'finance-customer'
ui:field: ComponentIdentifierPicker
ui:options:
allowArbitraryValues: false
developmentGroup:
title: DevelopmentGroup
type: string
description: Data Product development group
ui:field: EntitySelectionPicker
ui:fieldName: dataproduct
ui:property: spec.owner
ui:options:
allowArbitraryValues: false
dependsOn:
title: Depends on
type: array
default: []
items:
type: string
ui:field: EntityComponentsPicker
ui:fieldName: dataproduct
ui:options:
allowArbitraryValues: false
description: A Workload could depend on other components
readsFrom:
title: Reads from
type: array
default: []
items:
type: string
ui:field: ReadsFromPicker
description: This is filled only for DataPipeline workloads and it represents
the list of output ports or external systems that is reading
domainName:
type: string
ui:field: EntitySelectionPicker
ui:fieldName: domain
ui:property: spec.mesh.name
ui:options:
allowArbitraryValues: false
ui:widget: hidden
dataproductName:
type: string
ui:field: EntitySelectionPicker
ui:fieldName: dataproduct
ui:property: spec.mesh.name
ui:options:
allowArbitraryValues: false
ui:widget: hidden
- title: Source File Details
required:
- sourceName
- url
- format
- storage
- dataset_name
properties:
sourceName:
title: Source Name
type: string
description: Pick a name to help you identify this source in Airbyte
default: File
url:
title: URL
type: string
description: The URL path to access the file which should be replicated
format:
title: File Format
type: string
default: csv
description: "The Format of the file which should be replicated (Warning: some
formats may be experimental, please refer to the Airbyte docs)."
enum:
- csv
- json
- jsonl
- excel
- excel_binary
- feather
- parquet
- yaml
storage:
title: Storage Provider
type: string
default: HTTPS
description: The storage Provider or Location of the file(s) which should be
replicated. Only HTTPS is supported for now
ui:disabled: true
oneOf:
- const: HTTPS
title: "HTTPS: Public Web"
- const: GCS
title: "GCS: Google Cloud Storage"
- const: S3
title: "S3: Amazon Web Services"
- const: AzBlob
title: "AzBlob: Azure Blob Storage"
- const: SSH
title: "SSH: Secure Shell"
- const: SCP
title: "SCP: Secure Copy Protocol"
- const: SFTP
title: "SFTP: Secure File Transfer Protocol"
user_agent:
title: User-Agent
type: boolean
default: false
description: It is a relatively short bit of text that (attempts to) describe
the Software/Browser (the "Agent") that is making the request to a
website.
dataset_name:
title: Dataset Name
type: string
description: The Name of the final table to replicate this file into (should
include letters, numbers, dash and underscores only).
- title: Snowflake Destination Details
required:
- destinationName
properties:
destinationName:
title: Destination Name
type: string
description: Pick a name to help you identify this destination in Airbyte
default: Snowflake
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.
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.
- title: Connection
required:
- connectionName
properties:
connectionName:
title: Connection Name
type: string
description: Name of the connection
default: File <> Snowflake
steps:
- id: template
name: Fetch Skeleton + Template
action: fetch:template
input:
url: ./skeleton
targetPath: .
values:
name: ${{ parameters.name }}
domainName: ${{ parameters.domainName }}
dataproductName: ${{ parameters.dataproductName }}
description: ${{ parameters.description }}
domain: ${{ parameters.domain }}
dataproduct: ${{ parameters.dataproduct }}
identifier: ${{ parameters.identifier }}
developmentGroup: ${{ parameters.developmentGroup }}
dependsOn: ${{ parameters.dependsOn }}
readsFrom: ${{ parameters.readsFrom }}
sourceName: ${{ parameters.sourceName }}
url: ${{ parameters.url }}
format: ${{ parameters.format }}
storage: ${{ parameters.storage }}
user_agent: ${{ parameters.user_agent }}
dataset_name: ${{ parameters.dataset_name }}
destinationName: ${{ parameters.destinationName }}
schema: ${{ parameters.schema }}
database: ${{ parameters.database }}
connectionName: ${{ parameters.connectionName }}
useCaseTemplateId: urn:dmb:utm:airbyte-standard:0.0.0
infrastructureTemplateId: urn:dmb:itm:airbyte-provisioner:0
useCaseTemplateVersion: 0.0.0
repoUrl: gitlab.com?owner=AgileDMBSandbox%2F${{orgname}}%2Fmesh.repository%2F${{
parameters.domain | replace(r/domain:| |-/, "") }}%2F${{
parameters.dataproduct.split(".")[1] | replace(r/ |-/g, "")
}}&repo=${{ parameters.name.split(" ") | join("") | lower }}
rootDirectory: .
displayName: ${{ parameters.displayName }}
- id: publish
name: Publish
action: witboostMeshComponent:publish:gitlab
input:
allowedHosts:
- gitlab.com
description: This is ${{ parameters.name }}
repoUrl: gitlab.com?owner=AgileDMBSandbox%2F${{orgname}}%2Fmesh.repository%2F${{
parameters.domain | replace(r/domain:| |-/, "") }}%2F${{
parameters.dataproduct.split(".")[1] | replace(r/ |-/g, "")
}}&repo=${{ parameters.name.split(" ") | join("") | lower }}
rootDirectory: .
dataproduct: ${{ parameters.dataproduct }}
- id: register
name: Register
action: catalog:register
input:
repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
catalogInfoPath: /catalog-info.yaml
output:
links:
- title: Repository
url: ${{ steps.publish.output.remoteUrl }}
- title: Open in catalog
icon: catalog
entityRef: ${{ steps.register.output.entityRef }}