Created
August 8, 2025 11:07
-
-
Save fiadliel/0321ba60b341c3321b20674cca3d0def to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{ | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"$id": "https://github.com/EarnestResearch/dsys-delivery/orchestrator/data-ready-payload-v1", | |
"$defs": { | |
"DataReadyDateInfo": { | |
"properties": { | |
"date": { | |
"type": "string", | |
"pattern": "^\\d{4}-\\d{2}-\\d{2}$", | |
"description": "Date in 'YYYY-MM-DD' format." | |
}, | |
"hour": { | |
"type": "integer", | |
"maximum": 23, | |
"minimum": 0, | |
"description": "Optional hour of the day (0-23)." | |
} | |
}, | |
"additionalProperties": false, | |
"type": "object", | |
"required": [ | |
"date" | |
] | |
}, | |
"SelectionInfo": { | |
"oneOf": [ | |
{ | |
"properties": { | |
"selectionType": { | |
"type": "string", | |
"const": "date-time-value" | |
}, | |
"dateTimeValue": { | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"$id": "https://github.com/EarnestResearch/dsys-delivery/orchestrator/date-time-value", | |
"$ref": "#/$defs/DateTimeValue", | |
"$defs": { | |
"DateTimeValue": { | |
"oneOf": [ | |
{ | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"$id": "https://github.com/EarnestResearch/dsys-delivery/orchestrator/data-ready-date-info", | |
"properties": { | |
"date": { | |
"type": "string", | |
"pattern": "^\\d{4}-\\d{2}-\\d{2}$", | |
"description": "Date in 'YYYY-MM-DD' format." | |
}, | |
"hour": { | |
"type": "integer", | |
"maximum": 23, | |
"minimum": 0, | |
"description": "Optional hour of the day (0-23)." | |
} | |
}, | |
"additionalProperties": false, | |
"type": "object", | |
"required": [ | |
"date" | |
] | |
}, | |
{ | |
"items": { | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"$id": "https://github.com/EarnestResearch/dsys-delivery/orchestrator/data-ready-date-info", | |
"properties": { | |
"date": { | |
"type": "string", | |
"pattern": "^\\d{4}-\\d{2}-\\d{2}$", | |
"description": "Date in 'YYYY-MM-DD' format." | |
}, | |
"hour": { | |
"type": "integer", | |
"maximum": 23, | |
"minimum": 0, | |
"description": "Optional hour of the day (0-23)." | |
} | |
}, | |
"additionalProperties": false, | |
"type": "object", | |
"required": [ | |
"date" | |
] | |
}, | |
"type": "array", | |
"minItems": 1 | |
} | |
], | |
"description": "A single date-time object or an array of them. The array must not be empty." | |
} | |
} | |
} | |
}, | |
"type": "object", | |
"required": [ | |
"selectionType", | |
"dateTimeValue" | |
], | |
"title": "Date-Time Value Selection" | |
}, | |
{ | |
"properties": { | |
"selectionType": { | |
"type": "string", | |
"const": "date-time-range" | |
}, | |
"dateTimeRange": { | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"$id": "https://github.com/EarnestResearch/dsys-delivery/orchestrator/date-time-range-info", | |
"$ref": "#/$defs/DateTimeRangeInfo", | |
"$defs": { | |
"DataReadyDateInfo": { | |
"properties": { | |
"date": { | |
"type": "string", | |
"pattern": "^\\d{4}-\\d{2}-\\d{2}$", | |
"description": "Date in 'YYYY-MM-DD' format." | |
}, | |
"hour": { | |
"type": "integer", | |
"maximum": 23, | |
"minimum": 0, | |
"description": "Optional hour of the day (0-23)." | |
} | |
}, | |
"additionalProperties": false, | |
"type": "object", | |
"required": [ | |
"date" | |
] | |
}, | |
"DateTimeRangeInfo": { | |
"properties": { | |
"from": { | |
"$ref": "#/$defs/DataReadyDateInfo", | |
"description": "The start of the date range (inclusive)." | |
}, | |
"to": { | |
"$ref": "#/$defs/DataReadyDateInfo", | |
"description": "The end of the date range (inclusive)." | |
} | |
}, | |
"additionalProperties": false, | |
"type": "object", | |
"required": [ | |
"from", | |
"to" | |
] | |
} | |
} | |
} | |
}, | |
"type": "object", | |
"required": [ | |
"selectionType", | |
"dateTimeRange" | |
], | |
"title": "Date-Time Range Selection" | |
} | |
], | |
"description": "Describes the partitioning scheme for the data. It must conform to one of the specified structures based on `selectionType`." | |
} | |
}, | |
"properties": { | |
"version": { | |
"type": "string", | |
"enum": [ | |
"1" | |
], | |
"description": "Payload version." | |
}, | |
"projectId": { | |
"type": "string", | |
"description": "The GCP project ID." | |
}, | |
"datasetId": { | |
"type": "string", | |
"description": "The BigQuery dataset ID." | |
}, | |
"tableId": { | |
"type": "string", | |
"description": "The BigQuery table ID." | |
}, | |
"dataVersion": { | |
"$ref": "#/$defs/DataReadyDateInfo", | |
"description": "The version of the data" | |
}, | |
"selection": { | |
"$ref": "#/$defs/SelectionInfo" | |
} | |
}, | |
"additionalProperties": false, | |
"type": "object", | |
"required": [ | |
"version", | |
"projectId", | |
"datasetId", | |
"tableId", | |
"dataVersion" | |
], | |
"title": "Data Ready v1", | |
"description": "Defines the structure for a 'data ready' notification, version 1." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment