Skip to content

Commit 6284a8b

Browse files
authored
feat(specs): add task input for bigquery (#1549)
1 parent 3b03e92 commit 6284a8b

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

specs/ingestion/common/schemas/task.yml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ Task:
1111
trigger:
1212
$ref: '#/Trigger'
1313
input:
14-
description: The input that holds information specific to the task.
15-
type: object
14+
$ref: '#/TaskInput'
1615
enabled:
1716
type: boolean
1817
default: true
@@ -57,6 +56,8 @@ TaskCreate:
5756
enabled:
5857
type: boolean
5958
description: Whether the task is enabled or not.
59+
input:
60+
$ref: '#/TaskInput'
6061
# lastCursorValue:
6162
# type: integer
6263
# format: int64
@@ -94,6 +95,8 @@ TaskUpdate:
9495
$ref: './common.yml#/destinationID'
9596
trigger:
9697
$ref: '#/TriggerInput'
98+
input:
99+
$ref: '#/TaskInput'
97100
enabled:
98101
type: boolean
99102
description: Whether the task is enabled or not.
@@ -127,6 +130,11 @@ ActionType:
127130
description: The action to perform on the Algolia index.
128131
enum: ['replace', 'save']
129132

133+
TaskInput:
134+
oneOf:
135+
- $ref: '#/OnDemandDateUtilsInput'
136+
- $ref: '#/ScheduleDateUtilsInput'
137+
130138
TriggerInput:
131139
type: object
132140
additionalProperties: false
@@ -239,3 +247,33 @@ SubscriptionTrigger:
239247
$ref: '#/SubscriptionTriggerType'
240248
required:
241249
- type
250+
251+
# Task input
252+
253+
OnDemandDateUtilsInput:
254+
type: object
255+
additionalProperties: false
256+
description: The input for an `onDemand` task whose source is of type `bigquery` and for which extracted data spans a given time range.
257+
properties:
258+
startDate:
259+
description: The start date of the extraction (RFC3339 format).
260+
type: string
261+
endDate:
262+
description: The end date of the extraction (RFC3339 format).
263+
type: string
264+
required:
265+
- startDate
266+
- endDate
267+
268+
ScheduleDateUtilsInput:
269+
type: object
270+
additionalProperties: false
271+
description: The input for a `schedule` task whose source is of type `bigquery` and for which extracted data spans a fixed number of days.
272+
properties:
273+
timeframe:
274+
description: The timeframe of the extraction, in number of days from today.
275+
type: integer
276+
minimum: 1
277+
maximum: 30
278+
required:
279+
- timeframe

0 commit comments

Comments
 (0)