Trino
Module: query-trino. It provides 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” and
needs the capability “lakeLake Quality Data's own store, where it keeps the cuts it copies from the sources.”.
What it does
Section titled “What it does”Trino is a distributed SQLStructured Query Language The standard language for querying databases; the platform turns each rule into SQL for the engine that runs it. query engine. In Government Data it is the one engine that touches data:
- it reads the sources, the organisation’s databases, read only, and writes each 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. to the lakeLake Quality Data's own store, where it keeps the cuts it copies from the sources.’s bronze layer;
- it derives silver by applying the datasetDataset One table of a source as Quality Data reads it: a name, its fields and the rules that check them.’s mappingMapping How a dataset's table is read: which column each field reads and its type, the record key, each field's priority and the roles of some fields.;
- it evaluates the quality rules on silver and writes the results to gold;
- it answers the dashboards: Superset reads gold through it, as the person who is looking.
Being distributed is what fits Trino to large volumes. A coordinator plans each query and splits it into tasks, and its 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. run them in parallel, each on its own part of the data, so a large sourceSource A database the organisation already runs. Quality Data reads it and never writes to it. or lake table is read by several machines at once rather than by one. An installation that needs more capacity adds workers. The simulation shows where each part runs.
Trino never decides what to run. The core writes every statement, compiled 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., and signs it; the orchestrator’s job runners send those statements to Trino. While a rule is being written, its examples are checked on the spot by the rule editor, before it ever reaches Trino.
Isolation
Section titled “Isolation”- A token per job. Each job reaches Trino with a token that the core issues for that job alone, which says which datasetDataset One table of a source as Quality Data reads it: a name, its fields and the rules that check them. and which kind of work it is. Trino’s access 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., served by the core, allow that job only what it needs: its own dataset’s tables, its own sourceSource A database the organisation already runs. Quality Data reads it and never writes to it..
- Source passwords travel with the job that needs them and are never stored by Trino.
- Only counts come out. A quality job reports names, counts and durations, never a record’s values. Samples shown while testing a rule go through the application, which checks the person’s permission and writes the view to the audit logAudit trail The record of who did what and when: changes, runs, and every view of a source's values. Read with the auditor policy..
- People read only gold. For dashboardsDashboard Each dataset's charts of the results of the cut chosen: conformity and IGCD by cut, failures by dimension and more., Trino offers gold read-only, with each person’s row filters applied; bronze and silver are for jobs.
- No memory dump is ever written to disk, as it could hold records.
How it talks to the rest
Section titled “How it talks to the rest”| With | How |
|---|---|
| Job runners, Superset | Trino’s client protocol over HTTPSHypertext Transfer Protocol Secure The secure web protocol: the product is reached over it, with the certificate the installer makes., with a token per job or per person |
| The organisation’s databases | Each engine’s own protocol (such as SQLStructured Query Language The standard language for querying databases; the platform turns each rule into SQL for the engine that runs it. Server, Oracle, PostgreSQL or MySQL), read only |
| The lakeLake Quality Data's own store, where it keeps the cuts it copies from the sources. | S3Simple Storage Service Amazon's interface for storing files, which many storage systems (RustFS among them) also offer. and Iceberg REST, through the lake’s gate, 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. |
| The core | It reads its access 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. from the core |
Sizing
Section titled “Sizing”The coordinator runs on the main server, inside the orchestrator, which runs and manages it. The workers run on machines of their own: an installation starts with one and adds more for big data, without moving any data, since workers keep nothing between queries. A worker needs the most memory; as a starting point, about 13 GB for Trino on each worker, to be sized from the installation’s own data. Memory is divided between quality jobs and dashboardDashboard Each dataset's charts of the results of the cut chosen: conformity and IGCD by cut, failures by dimension and more. queries, so one cannot starve the other, and a query too big for the memory spills to a disk of its own. Before Trino restarts for an update, the orchestrator lets the running jobs finish and holds new ones.
Where its data lives
Section titled “Where its data lives”Nowhere of its own: Trino keeps no data between queries. What it writes goes to the lakeLake Quality Data's own store, where it keeps the cuts it copies from the sources.; its spill disk holds temporary files only while a query runs.
Government Data · Guide v0.8.1