Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


web / lib/jobs/handlers/validate-schema-job

lib/jobs/handlers/validate-schema-job

Defines the job handler for validating the detected schema against the dataset’s existing schema.

This job is responsible for schema validation and determining the next processing stage. Its main tasks are:

  • Finalizing the schema detection using the cached state from the schema detection stage.
  • Comparing the newly detected schema with the current schema version of the target dataset.
  • Identifying breaking changes (e.g., type changes, removed fields) and non-breaking changes (e.g., new optional fields).
  • Determining whether the changes can be automatically approved based on the dataset’s configuration.

Next stage routing:

  • If changes require manual approval → AWAIT_APPROVAL stage
  • If changes are auto-approved → CREATE_SCHEMA_VERSION stage
  • If no schema changes → GEOCODE_BATCH stage

Variables

validateSchemaJob

const validateSchemaJob: object

Type declaration

slug

slug: "validate-schema" = JOB_TYPES.VALIDATE_SCHEMA

handler()

handler: (context) => Promise<{ output: { requiresApproval: boolean; hasBreakingChanges: boolean; newFields: number; }; }>

Parameters
context

JobHandlerContext

Returns

Promise<{ output: { requiresApproval: boolean; hasBreakingChanges: boolean; newFields: number; }; }>

Last updated on