Skip to content

Commit

Permalink
feat(specs): add task input for bigquery (#1549)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluf22 authored May 19, 2023
1 parent 3b03e92 commit 6284a8b
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions specs/ingestion/common/schemas/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ Task:
trigger:
$ref: '#/Trigger'
input:
description: The input that holds information specific to the task.
type: object
$ref: '#/TaskInput'
enabled:
type: boolean
default: true
Expand Down Expand Up @@ -57,6 +56,8 @@ TaskCreate:
enabled:
type: boolean
description: Whether the task is enabled or not.
input:
$ref: '#/TaskInput'
# lastCursorValue:
# type: integer
# format: int64
Expand Down Expand Up @@ -94,6 +95,8 @@ TaskUpdate:
$ref: './common.yml#/destinationID'
trigger:
$ref: '#/TriggerInput'
input:
$ref: '#/TaskInput'
enabled:
type: boolean
description: Whether the task is enabled or not.
Expand Down Expand Up @@ -127,6 +130,11 @@ ActionType:
description: The action to perform on the Algolia index.
enum: ['replace', 'save']

TaskInput:
oneOf:
- $ref: '#/OnDemandDateUtilsInput'
- $ref: '#/ScheduleDateUtilsInput'

TriggerInput:
type: object
additionalProperties: false
Expand Down Expand Up @@ -239,3 +247,33 @@ SubscriptionTrigger:
$ref: '#/SubscriptionTriggerType'
required:
- type

# Task input

OnDemandDateUtilsInput:
type: object
additionalProperties: false
description: The input for an `onDemand` task whose source is of type `bigquery` and for which extracted data spans a given time range.
properties:
startDate:
description: The start date of the extraction (RFC3339 format).
type: string
endDate:
description: The end date of the extraction (RFC3339 format).
type: string
required:
- startDate
- endDate

ScheduleDateUtilsInput:
type: object
additionalProperties: false
description: The input for a `schedule` task whose source is of type `bigquery` and for which extracted data spans a fixed number of days.
properties:
timeframe:
description: The timeframe of the extraction, in number of days from today.
type: integer
minimum: 1
maximum: 30
required:
- timeframe

0 comments on commit 6284a8b

Please sign in to comment.