-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
216 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
test/templates/api/repositories/template-use-wr-bigquery-snowflake/001-ok/expected-http-code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
202 |
8 changes: 8 additions & 0 deletions
8
...mplates/api/repositories/template-use-wr-bigquery-snowflake/001-ok/expected-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"id": "template.use/%s", | ||
"type": "template.use", | ||
"url": "https://templates.keboola.local/v1/tasks/template.use/%s", | ||
"status": "processing", | ||
"isFinished": false, | ||
"createdAt": "%s" | ||
} |
23 changes: 23 additions & 0 deletions
23
test/templates/api/repositories/template-use-wr-bigquery-snowflake/001-ok/request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"path": "/v1/repositories/keboola/templates/my-template-id/1.2.3/use", | ||
"method": "POST", | ||
"headers": { | ||
"Content-Type": "application/json", | ||
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" | ||
}, | ||
"body": { | ||
"branch": "default", | ||
"name": "inst-001", | ||
"steps": [ | ||
{ | ||
"id": "g01-s01", | ||
"inputs": [ | ||
{ | ||
"id": "wr-snowflake-host", | ||
"value": "my-host" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...templates/api/repositories/template-use-wr-bigquery-snowflake/002-poll/expected-http-code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
200 |
14 changes: 14 additions & 0 deletions
14
...lates/api/repositories/template-use-wr-bigquery-snowflake/002-poll/expected-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"id": "template.use/%s", | ||
"type": "template.use", | ||
"url": "https://templates.keboola.local/v1/tasks/template.use/%s", | ||
"status": "success", | ||
"isFinished": true, | ||
"createdAt": "%s", | ||
"finishedAt": "%s", | ||
"duration": %d, | ||
"result": "template instance with id \"%s\" created", | ||
"outputs": { | ||
"instanceId": "%s" | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
test/templates/api/repositories/template-use-wr-bigquery-snowflake/002-poll/request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"path": "<<001-ok:response.url>>", | ||
"method": "GET", | ||
"headers": { | ||
"X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" | ||
}, | ||
"repeat": { | ||
"until": "status != 'processing'", | ||
"timeout": 60 | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
test/templates/api/repositories/template-use-wr-bigquery-snowflake/expected-state.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"branches": [ | ||
{ | ||
"branch": { | ||
"name": "Main", | ||
"description": "", | ||
"isDefault": true, | ||
"metadata": { | ||
"KBC.KAC.templates.instances": "[{\"instanceId\":\"%s\",\"instanceName\":\"inst-001\",\"templateId\":\"my-template-id\",\"repositoryName\":\"keboola\",\"version\":\"1.2.3\",\"created\":{\"date\":\"%s\",\"tokenId\":\"%s\"},\"updated\":{\"date\":\"%s\",\"tokenId\":\"%s\"}}]" | ||
} | ||
}, | ||
"configs": [ | ||
{ | ||
"componentId": "keboola.%s", | ||
"name": "Data Destination", | ||
"description": "## Description:\nData load to Snowflake DB.", | ||
"changeDescription": "From template keboola/my-template-id/1.2.3", | ||
"configuration": { | ||
"parameters": { | ||
"db": { | ||
"host": "my-host" | ||
} | ||
} | ||
}, | ||
"rows": [ | ||
{ | ||
"name": "activity", | ||
"description": "", | ||
"changeDescription": "From template keboola/my-template-id/1.2.3", | ||
"isDisabled": false, | ||
"configuration": { | ||
"parameters": { | ||
"foo": "bar" | ||
} | ||
} | ||
} | ||
], | ||
"metadata": { | ||
"KBC.KAC.templates.configId": "{\"idInTemplate\":\"destination\"}", | ||
"KBC.KAC.templates.configInputs": "[{\"input\":\"wr-snowflake-host\",\"key\":\"parameters.db.host\"}]", | ||
"KBC.KAC.templates.instanceId": "%s", | ||
"KBC.KAC.templates.repository": "keboola", | ||
"KBC.KAC.templates.rowsIds": "[{\"idInProject\":\"%s\",\"idInTemplate\":\"activity\"}]", | ||
"KBC.KAC.templates.templateId": "my-template-id" | ||
}, | ||
"isDisabled": false | ||
} | ||
] | ||
} | ||
] | ||
} |
5 changes: 5 additions & 0 deletions
5
test/templates/api/repositories/template-use-wr-bigquery-snowflake/initial-state.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"backend": { | ||
"type": "bigquery" | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...s/api/repositories/template-use-wr-bigquery-snowflake/repository/.keboola/repository.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"version": 2, | ||
"author": { | ||
"name": "Example Author", | ||
"url": "https://example.com" | ||
}, | ||
"templates": [ | ||
{ | ||
"id": "my-template-id", | ||
"name": "My Template", | ||
"description": "Full workflow to ...", | ||
"path": "my-template", | ||
"versions": [ | ||
{ | ||
"version": "1.2.3", | ||
"description": "", | ||
"stable": false, | ||
"path": "v1" | ||
} | ||
] | ||
} | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
...ries/template-use-wr-bigquery-snowflake/repository/my-template/v1/src/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### My Template | ||
|
||
Full workflow to ... | ||
|
24 changes: 24 additions & 0 deletions
24
...ositories/template-use-wr-bigquery-snowflake/repository/my-template/v1/src/inputs.jsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
stepsGroups: [ | ||
{ | ||
description: "Configure the Snowflake", | ||
required: "all", | ||
steps: [ | ||
{ | ||
icon: "component:"+SnowflakeWriterComponentId(), | ||
name: "Snowflake", | ||
description: "Destination", | ||
inputs: [ | ||
{ | ||
id: "wr-snowflake-host", | ||
name: "Hostname", | ||
description: "Insert database hostname", | ||
type: "string", | ||
kind: "input", | ||
}, | ||
] | ||
}, | ||
], | ||
}, | ||
], | ||
} |
11 changes: 11 additions & 0 deletions
11
...itories/template-use-wr-bigquery-snowflake/repository/my-template/v1/src/manifest.jsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
configurations: [ | ||
if HasProjectBackend('snowflake') == true then | ||
{ | ||
componentId: SnowflakeWriterComponentId(), | ||
id: ConfigId('destination'), | ||
path: 'writer/keboola.wr-snowflake/destination', | ||
rows: [], | ||
}, | ||
], | ||
} |
7 changes: 7 additions & 0 deletions
7
...repository/my-template/v1/src/transformation/keboola.bigquery/destination2/config.jsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
parameters: { | ||
db: { | ||
host: 'abc', | ||
}, | ||
}, | ||
} |
2 changes: 2 additions & 0 deletions
2
.../my-template/v1/src/transformation/keboola.bigquery/destination2/description.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
## Description: | ||
Data load to Bigquery DB. |
3 changes: 3 additions & 0 deletions
3
...e/repository/my-template/v1/src/transformation/keboola.bigquery/destination2/meta.jsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
name: 'Data Destination2', | ||
} |
7 changes: 7 additions & 0 deletions
7
...lake/repository/my-template/v1/src/writer/keboola.wr-snowflake/destination/config.jsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
parameters: { | ||
db: { | ||
host: Input("wr-snowflake-host"), | ||
}, | ||
}, | ||
} |
2 changes: 2 additions & 0 deletions
2
...itory/my-template/v1/src/writer/keboola.wr-snowflake/destination/description.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
## Description: | ||
Data load to Snowflake DB. |
3 changes: 3 additions & 0 deletions
3
...wflake/repository/my-template/v1/src/writer/keboola.wr-snowflake/destination/meta.jsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
name: "Data Destination", | ||
} |
5 changes: 5 additions & 0 deletions
5
...y/my-template/v1/src/writer/keboola.wr-snowflake/destination/rows/activity/config.jsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
parameters: { | ||
"foo": "bar", | ||
}, | ||
} |
1 change: 1 addition & 0 deletions
1
...ate/v1/src/writer/keboola.wr-snowflake/destination/rows/activity/description.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
4 changes: 4 additions & 0 deletions
4
...ory/my-template/v1/src/writer/keboola.wr-snowflake/destination/rows/activity/meta.jsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
name: "activity", | ||
isDisabled: false, | ||
} |
Empty file.