The orchestrator and its job runners
Module: orchestrator. It needs the capability “SQLStructured Query Language The standard language for querying databases; the platform turns each rule into SQL for the engine that runs it. query”, which
Trino provides.
Who does what
Section titled “Who does what”Running a quality cutCut The dataset's data as it was on one date, copied into the lake so it can be measured again without touching the source. Every figure of a report refers to that moment. is split in three roles, each doing one thing:
| Part | Does | Never does |
|---|---|---|
| The core | Owns the rulesRule It applies a pattern to a field; the pattern gives it its dimension and a default severity. The rules that count are the ones on main, the approved version. and schedulesSchedule What starts a dataset's cuts on its own: daily, weekly, monthly…, compiles and signs every statement, hands out each job’s secrets, records the results | Run a job or talk to Trino |
| The operator | Fires the schedules, keeps each job’s state, retries with backoff, makes sure only one job writes a table at a time | Read or change a statement, see a secret |
| The job runners | Take a job, fetch its signed statements, check the signature, send each statement to Trino, report counts | Write SQLStructured Query Language The standard language for querying databases; the platform turns each rule into SQL for the engine that runs it., keep state, read values |
The operator is the orchestrator’s service. The job runners are light processes of the orchestrator, on the main server beside it. They process no data: they send the signed SQLStructured Query Language The standard language for querying databases; the platform turns each rule into SQL for the engine that runs it. to Trino and report. Two of them run jobs in parallel, and since they keep no state, more can be added without touching the rest.
The orchestrator also runs and manages Trino’s coordinator, on the main server beside the operator, so it knows when Trino may restart. Trino’s workersWorker A program that runs on its own beside the application and does the heavy work: listing a source's tables, mapping a table, copying a cut and evaluating it. Mapping and cuts need at least one., which do the heavy query work, run on machines of their own.
Its web
Section titled “Its web”The orchestrator has a web of its own, at /orchestrator/, opened from
the apps menu as Orchestrator by whoever holds
orchestrator:ViewFlows. People sign in through the core, with the same
account, and the web follows the language chosen there. It has three
screens:
- Flows: what the orchestrator runs, by folder, with Run now and See its runs.
- Runs: every run, newest first, by flow, state and date; a run shows its progress, its counts and its Log, and can be cancelled.
- Import: loads the flows already on a cluster: it shows what a job runner found, can ask it for a new scan, and imports the flows picked, once what the engine flagged is confirmed.
What each person may do there comes from their permissions (Permissions). The servers’ resources, memory, disk and processor, are not shown here: they belong in Monitoring, the installation’s Grafana.
A cut, step by step
Section titled “A cut, step by step”- The operator fires the cut on its scheduleSchedule What starts a dataset's cuts on its own: daily, weekly, monthly…, or when someone starts it.
- The core compiles the statements from the rulesRule It applies a pattern to a field; the pattern gives it its dimension and a default severity. The rules that count are the ones on main, the approved version. on the catalog’s main line, signs them, and records the bundle.
- A job runner takes the job and fetches the bundle and the job’s secrets from the core. A statement that is not in a verified bundle is never run.
- The job runner sends each statement to Trino with the job’s token, checks that each answer has the expected shape (counts only), and records its progress, so a retry resumes where it stopped.
- The job runner reports names, counts, durations, the lakeLake Quality Data's own store, where it keeps the cuts it copies from the sources.’s snapshot identifiers and any stage that failed to the core. The cut runs as three jobs in a chain: extraction to bronze, derivation to silver, evaluationEvaluation It runs every rule on main on every record of a cut. A rule fails, passes or does not apply to each record; one it does not apply to is left out of its figures. into gold.
If a job runner stops, its job’s lease runs out and another job runner takes it; the old attempt’s query is cancelled first, so two attempts never write the same cut.
How it talks to the rest
Section titled “How it talks to the rest”| With | How |
|---|---|
| The core | HTTPSHypertext Transfer Protocol Secure The secure web protocol: the product is reached over it, with the certificate the installer makes. on Traefik’s internal entry point, with mutual TLSTransport Layer Security The encryption that protects data travelling between two systems; with mutual TLS, both sides prove who they are with a certificate. |
| People | Its web and APIApplication programming interface The entry point other programs use to talk to the platform; its own screens use it too. at /orchestrator/ through Traefik; sign-in at the core over OpenID Connect |
| Trino | Trino’s client protocol, with a token valid for one job |
Before an update, the core asks the orchestrator how much work is running and due soon, and the update waits for it. While Trino restarts, the operator holds the jobs that need it and lets the running ones finish.
Where its data lives
Section titled “Where its data lives”The operator keeps the jobs’ state, leases and attempts. The job runners keep nothing.
Government Data · Guide v0.8.1