Skip to content

PostgreSQL

Module: quality-data (the core). Other modules get a database of their own in it.

PostgreSQL is the platform’s database. The core keeps in it:

  • accounts, groups, policiesPolicy A set of permissions an administrator gives an account or a group. The product ships ready-made ones for the usual roles, such as quality-steward and quality-viewer. and the identity providers;
  • settings, and the secrets of settings, encrypted with a key kept apart;
  • sourcesSource A database the organisation already runs. Quality Data reads it and never writes to it., datasetsDataset One table of a source as Quality Data reads it: a name, its fields and the rules that check them., schedulesSchedule What starts a dataset's cuts on its own: daily, weekly, monthly…, cutsCut 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. and remediation queuesRemediation queue The findings of one value of a grouping field, such as an office, a region or a channel, with an SLA in days. The dashboard lists the groups with the most open findings first, each with its priority added up.;
  • an index of the quality results: the cuts, their state and their totals, which the application’s screens and queues read. The record of results itself is in the lakeLake Quality Data's own store, where it keeps the cuts it copies from the sources.’s gold tables; if the two ever differ, gold wins and the index is rebuilt from it;
  • the audit log.

Modules that need a relational database, such as Superset or the orchestrator, get a database and a user of their own when they are added. One module cannot read another’s database.

The audit log records who did what, when and on what: sign-ins, access and settings changes, ruleRule 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. approvals, every view of personal dataPersonal data Values from a source about a person. They are shown whole only to policies that allow View personal data, such as quality-analyst; anyone else sees them masked, and every whole view is recorded in the audit trail. with its reason, exports and runs started by hand. It is append-only: the application cannot change or delete an entry, and each entry carries a hash of the one before it, so a gap or an edit shows. It stays queryable for five years; older months are archived to the lakeLake Quality Data's own store, where it keeps the cuts it copies from the sources.. No other module reads it: Grafana does not read the core’s database.

With How
The core SQLStructured Query Language The standard language for querying databases; the platform turns each rule into SQL for the engine that runs it. over 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 checks the server’s certificate and name
Other modules Each with its own user, on its own database

PostgreSQL is not reachable from outside the core’s server: it publishes no port, and only the services that use it share its network.

In a volume on the core’s server. Its databases are critical: before every update they are dumped and the dump checked, and if that cannot be done, the update does not go ahead. Removing a module keeps its database; only a purge deletes it, after a backup.

Government Data · Guide v0.8.1