Skip to content

Commit

Permalink
fix(specs): ingestion docker task input (#3488)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Aug 7, 2024
1 parent 41a6f11 commit 6c62a81
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 2 deletions.
26 changes: 25 additions & 1 deletion specs/ingestion/common/schemas/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,34 @@ DockerStreamsInput:
type: object
properties:
streams:
type: object
type: array
items:
$ref: '#/DockerStreams'
required:
- streams

DockerStreams:
type: object
properties:
name:
type: string
description: The name of the stream to fetch the data from (e.g. table name).
properties:
type: array
description: The properties of the stream to select (e.g. column).
items:
type: string
syncMode:
$ref: '#/DockerStreamsSyncMode'
required:
- name
- syncMode

DockerStreamsSyncMode:
type: string
description: The strategy to use to fetch the data.
enum: [incremental, fullTable]

failureThreshold:
type: integer
minimum: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ post:
- transformations
summary: Try a transformation
description: Try a transformation.
operationId: tryTransformations
operationId: tryTransformation
x-acl:
- addObject
- deleteIndex
Expand Down
35 changes: 35 additions & 0 deletions tests/CTS/requests/ingestion/createTask.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,40 @@
"action": "replace"
}
}
},
{
"testName": "task shopify",
"parameters": {
"sourceID": "search",
"destinationID": "destinationName",
"cron": "* * * * *",
"action": "replace",
"input": {
"streams": [
{
"name": "foo",
"syncMode": "incremental"
}
]
}
},
"request": {
"path": "/2/tasks",
"method": "POST",
"body": {
"sourceID": "search",
"destinationID": "destinationName",
"cron": "* * * * *",
"action": "replace",
"input": {
"streams": [
{
"name": "foo",
"syncMode": "incremental"
}
]
}
}
}
}
]
39 changes: 39 additions & 0 deletions tests/CTS/requests/ingestion/createTaskV1.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,44 @@
"action": "replace"
}
}
},
{
"testName": "task shopify",
"parameters": {
"sourceID": "search",
"destinationID": "destinationName",
"trigger": {
"type": "onDemand"
},
"action": "replace",
"input": {
"streams": [
{
"name": "foo",
"syncMode": "incremental"
}
]
}
},
"request": {
"path": "/1/tasks",
"method": "POST",
"body": {
"sourceID": "search",
"destinationID": "destinationName",
"trigger": {
"type": "onDemand"
},
"action": "replace",
"input": {
"streams": [
{
"name": "foo",
"syncMode": "incremental"
}
]
}
}
}
}
]

0 comments on commit 6c62a81

Please sign in to comment.