🇬🇧 English
🇬🇧 English
Appearance
🇬🇧 English
🇬🇧 English
Appearance
Deliverable D2.6: Technical support document for the management of the project databases
Draft
Draft published in October 2026. The document remains open until the deadline of the deliverable (31/05/2027): entries are added to the log of interventions as support requests arrive, and the evolution of the project databases is described. The procedures marked «to be completed» will be written out in full once they have been carried out and verified at least once.
The document makes verifiable the technical support activity for the management of the databases of the MAPS project, provided for by task 2.7 of the September 2026 Gantt chart («management and evolution of the project databases»; task 2.6 in the January 2026 plan). It is divided into three parts:
Scope. The document is limited to what the project databases need, as the title of the deliverable requires («limited to the functional needs of the project»). The ETL pipelines that feed the database are described in deliverable D2.2.1 and in the operational guide of appendix A2; the hosting infrastructure in deliverable D2.1, part 3. The programming interfaces of the Datastore (the REST service generated by PostgREST and the authentication and download service) will be verified and specified in deliverable D2.5.1, «Internal APIs v1»; here they appear only insofar as they are needed for management.
The consultant's contribution. The Datastore is a product of the MAPS project. The consultant was responsible for its design, technical direction and verification, and provides support for its management: enabling users, interventions on the infrastructure, responding to reports.
Reference repositories. The evidence cited is in two repositories:
gst-maps-pipelines: code of the pipelines, of the Datastore (datastore/), of the authentication service (datastore_auth_bridge/), the Kubernetes manifests of the Datastore (deploy/datastore/), database migrations (postgres/migrations/), documentation (docs/) and release notes (CHANGELOG.md);maps-infrastruttura: Pulumi code describing the cluster, the database and the backups (pulumi/).The Silver layer of the data lake stores territorial data in an entity-attribute-value (EAV) schema: one row for each combination of territory, attribute, value and validity period, in the table silver.territory_attributes (over 21 million rows in June 2026, according to the operations manual docs/datastore-ops.md of the gst-maps-pipelines repository), alongside fact tables for the multidimensional datasets. It is a form suited to normalising and tracing the data, not to consulting them: to extract a series one needs to know the technical name of the attribute, write SQL on the EAV schema and, for multidimensional datasets, reconstruct the labels from the codes.
The researchers of GST and GSSI, in spring 2026, instead needed to explore the data to understand which ones to use in building the algorithm, without yet knowing what to look for. The analysis notes of 30/04/2026 (project repository gst-maps, file docs/analysis/2026-04-30-accesso-datalake-per-ricercatori.md) frame the problem by separating two things that until then had been treated together:
| Alternative | Why it was discarded |
|---|---|
| Read-only PostgreSQL accounts on Silver, one per researcher | Leaves the researcher with the EAV schema, which is precisely the difficulty to be removed; multiplies the user accounts to be administered directly on the database |
| OpenMetadata catalogue only (discovery without access) | Solves discovery, not extraction: to obtain the data the researcher still has to go back to the source portals |
| Download of the Bronze files | Bronze is a working copy of the source files, not normalised: it makes no sense as a distribution channel |
| An «exploratory» Gold built in advance, with all the variables | The right form of a Gold table depends on the use case, which was not known at that date; building it beforehand would have fixed a structure to be redone |
| Shared computing environment (for example JupyterHub) | Additional infrastructure to maintain, aimed at users who write code; does not solve discovery |
The choice was a web application that gives the researcher a navigable catalogue of Silver and lets them compose the table they need themselves: the Gold is generated on request, in the «wide» form (one row per territory, one column per variable) expected by pandas, R or a spreadsheet. The specification is in the gst-maps-pipelines repository, file docs/datastore/00-design.md of 12/05/2026, with the plans of the five implementation phases in the files from docs/datastore/01-db-backend.md to docs/datastore/05-my-tables.md. The Datastore was then reported as an addition to the architecture in the WP2 delivery and described in deliverable D2.2.1, section «Data access: the Datastore».
The Datastore is reachable at https://datastore.maps.gransassotech.org. It offers:
gst-maps-pipelines repository, file docs/reconciliation-methodology-it.md);flowchart LR U[Researcher
browser] --> W[Web interface
Vue 3 + nginx] W -->|/auth| A[Authentication
and download service
FastAPI] W -->|/api| R[PostgREST v14.11] A -->|verifies credentials| OM[OpenMetadata
project identity] A --> DB[(PostgreSQL 17 + PostGIS
schemas silver, gold, datastore)] R --> DB DB -->|LISTEN/NOTIFY| CW[catalog-worker] CW -->|starts| P[Prefect
gold-build-pipeline] P -->|writes Gold table| DB DB -.->|daily backup
and continuous WAL| S[(Object storage
DigitalOcean Spaces)]
The components run in the project's Kubernetes cluster, in the datastore namespace, and are described by the manifests in deploy/datastore/ of the gst-maps-pipelines repository:
| Component | What it does | Where it is |
|---|---|---|
| Web interface | Vue 3 application served by nginx; routes calls to the other services | datastore/, datastore/nginx.conf, deploy/datastore/datastore-deployment.yaml |
| PostgREST | Exposes the catalogue and the data read-only as a REST service, applying the permissions of the PostgreSQL roles | deploy/datastore/postgrest-deployment.yaml |
| Authentication and download service | Verifies the user's credentials against OpenMetadata, issues the access token, produces the files to be downloaded | datastore_auth_bridge/main.py, deploy/datastore/auth-bridge-deployment.yaml |
| catalog-worker | Listens for Gold table requests in the database and starts the generation on Prefect | scripts/catalog/catalog_worker.py, deploy/datastore/catalog-worker-deployment.yaml |
| Gold generation flow | Reads the Silver rows, applies territorial reconciliation, builds the wide table with DuckDB and writes it to the gold schema | flows/catalog/gold_build_flow.py, deployment gold-build-pipeline in flows/catalog/prefect.yaml |
The database. It is a PostgreSQL 17 cluster with PostGIS managed by the CloudNativePG operator, described in the maps-infrastruttura repository, file pulumi/manifests/production/maps-postgres.yaml, with a 250 GiB disk. Three schemas matter for the Datastore:
silver: the normalised territorial data (EAV table and multidimensional fact tables), written by the ETL pipelines;datastore: the catalogue (variable_definitions, one row per variable or dataset; the tags synchronised from OpenMetadata; the dimension labels; the materialised views dataset_catalog, dataset_record_counts and dataset_search_index) and the queue of Gold requests (gold_requests);gold: the tables generated on request by the researchers, as well as support tables such as gold.population_weights, used by territorial reconciliation.The schema evolves through numbered migrations, applied in order (postgres/migrations/, about 190 files in October 2026). The datastore catalogue was created by migration 0083; the request queue records the author of each request from migration 0137; the materialised views of the catalogue were introduced by migration 0162.
Identity. The users of the Datastore are the users of OpenMetadata, the project's metadata catalogue: a single account is valid for both tools. There is no separate user store for the Datastore, so enabling or disabling a researcher is a single operation (procedure in Enabling a new researcher). The integration was carried out on 22/05/2026 (issue #55 of the gst-maps-pipelines repository, «datastore: integrate authentication with OpenMetadata»), replacing the manually issued tokens of the first version.
Access. The user logs in with the OpenMetadata credentials; the authentication service verifies them and issues a signed token valid for thirty days, which the interface presents with each request. Once the token has expired, the user logs in again with the same credentials.
Roles in the database. Permissions are enforced by PostgreSQL through dedicated roles, created by migration 0009 and subsequent ones:
| Role | What it is for |
|---|---|
authenticator | PostgREST connection role, which assumes the role indicated in the token for each request |
portal_analyst | role of authenticated researchers: consults catalogue and data, requests the generation of Gold tables, downloads the results |
portal_admin | administrative role, for catalogue maintenance operations |
All researchers operate with the same portal_analyst role: the database does not distinguish permissions from one researcher to another. The author of each Gold table is nevertheless recorded with the request (migration 0137) and appears in the list of generated tables. The specification docs/datastore/00-design.md defers any per-user separation to a later version.
The main database and the OpenMetadata database are backed up with the backup mechanism of the CloudNativePG operator (Barman) to DigitalOcean Spaces object storage:
| Database | Full backup | WAL archiving | Configured retention | Evidence in the maps-infrastruttura repository |
|---|---|---|---|---|
| main (MAPS and Datastore data) | every day at 02:00 UTC | continuous, gzip-compressed, parallel since 18/05/2026 | three days | pulumi/manifests/production/maps-postgres.yaml, maps-postgres-scheduled-backup.yaml |
| OpenMetadata (users and metadata) | every day at 03:00 UTC | continuous | three days | pulumi/manifests/production/metadata-db.yaml, metadata-db-scheduled-backup.yaml |
Full backup and WAL together allow restoring to any point in time within the retention window. Retention duration and restore test are open management points, described in Points under verification.
Datasets. The Datastore exposes the datasets of the data catalogue approved in May 2026, progressively loaded by the ETL pipelines:
| Date | Datasets in the Datastore | Source of the figure |
|---|---|---|
| 12/06/2026 | 130 | WP2 delivery report |
| 14/07/2026 | 133 | project ETL dashboard |
| 03/09/2026 | 147 with municipal granularity and «Silver validato» (Silver validated) quality | check by a GSSI researcher, e-mail of 04/09/2026 |
| 25/09/2026 | all datasets in the catalogue, except «a very limited number» still being loaded | communication to users of 25/09/2026 |
The current count is to be verified and will be reported here, read from the datastore.dataset_catalog view. The remaining work is tracked by issue #56 of the gst-maps-pipelines repository («datastore: populate the Datastore with all territorial data sources»).
Verification status of the datasets. Since 05/09/2026 (version v0.48.0) each dataset carries its own verification status in the catalogue: «Validated» when it has passed the latest quality check, «QA» when problems are open and being resolved, no mark when the check has not yet started. The status is read from the ClickUp «Datastore» list, where the quality check takes place, by the sync-verified-status-pipeline flow.
Users. Seven GST and GSSI users enabled on 24/06/2026, one further GST user enabled on 10/07/2026 (details in the log). The most recent usage feedback dates from 28/09/2026: the users find the tool «very simple and intuitive» and do not consider a training session necessary.
| Date | Event | Evidence |
|---|---|---|
| 30/04/2026 | Analysis of the problem of data access for researchers | gst-maps, docs/analysis/2026-04-30-accesso-datalake-per-ricercatori.md |
| 12/05/2026 | Datastore specification | gst-maps-pipelines, docs/datastore/00-design.md |
| 15/05/2026 | Datastore namespace and secrets in the cluster; permission to create roles for the database application user | maps-infrastruttura, commits e86ca45, e66a7b8, c1adda1 |
| 18/05/2026 | Database disk increased to 250 GiB and parallel WAL archiving | maps-infrastruttura, commit 0b71289 |
| 20/05/2026 | First version: catalogue, cart, Gold generation | gst-maps-pipelines v0.7.0 |
| 22/05/2026 | Access with the project identity (OpenMetadata) | issue #55; maps-infrastruttura, commit 3459974 |
| 30/05/2026 | Reconciliation to the 2025 municipal boundaries in Gold generation | v0.14.0; issue #58 «datastore UI: reconcile data to 2025 administrative boundaries with download option» |
| 02/06/2026 | Text search on the names and descriptions of the variables | v0.17.0; issue #89 |
| 05/06/2026 | Browsing of the Bronze files; author recorded on Gold requests | v0.22.0; migration 0137 |
| 06/06/2026 | ZIP download with one CSV per source | v0.24.0 |
| 12/06/2026 | Catalogue on materialised views: response time from about 28 seconds to less than one | v0.37.0; issue #165 «perf: investigate slow performance on Datastore under concurrent use» |
| 24/06/2026 | Enabling of the first seven users | e-mail «Accesso al Datastore GST Maps – credenziali» (access to the GST Maps Datastore – credentials) |
| 05/09/2026 | Verification status of the datasets in the catalogue; fix of Gold generation for multi-year EAV data | v0.48.0, v0.48.1 |
| 25/09/2026 | Multiple filters, «Capoluogo di provincia» level, «Stato dataset» (dataset status) filter | v0.50.3 |
| 01/10/2026 | Decommissioning of the trial staging environment | decommissioning documentation in the gst-maps-pipelines repository |
The open extensions concerning the Datastore database, tracked as issues of the gst-maps-pipelines repository:
For each point: what it is, why it matters, what is needed.
gst-maps-pipelines repository, STATUS.md, item 9 of the «Wanted Features», «Pulumi infra stack state re-sync»). It matters because the procedures for rotating credentials and for rebuilding go through that code. A comparison between code and cluster and the realignment of the differences are needed.The procedures presuppose administrative access to the cluster (the project's kubeconfig file), to OpenMetadata and to Prefect. The complete commands for operations on the data are in the operations manual docs/datastore-ops.md of the gst-maps-pipelines repository, which remains the technical reference; here the sequence and the checkpoint of each step are given.
Disabling a researcher. The user is deactivated in OpenMetadata: from that moment they can no longer log in. A token already issued remains valid until its expiry, at most thirty days; if access needs to be interrupted immediately, the token signing secret is rotated (procedure Rotating credentials), which closes the sessions of all users.
Credential recovery. In July 2026 self-service credential recovery by e-mail from OpenMetadata was not active, and the researcher had to contact an administrator; the current status is to be verified.
Loading the data into Silver is the task of the ETL pipelines (appendix A2). For a loaded dataset to appear in the Datastore, the following steps are needed, which vary with the type of dataset («Per-source summary» table of the manual docs/datastore-ops.md).
datastore.variable_definitions): catalog/datastore-prepare-pipeline, which registers the variables, synchronises tags and descriptions from OpenMetadata and generates the short names; many pipelines launch it themselves at the end of Flow 04;scripts/generate_cube_ddl.py, have it applied by the continuous integration pipeline after the merge, then run Flow 02;sync-from-om-pipeline deployment; to have them immediately, the same deployment is launched manually.refresh-search-index-pipeline, which recalculates the three materialised views of the catalogue. Without this step the new dataset and the new counts are not visible.kubectl rollout restart of the postgrest deployment).sync-verified-status-pipeline.ANALYZE on the fact table («Troubleshooting» section of the manual).On the researcher's side, generation is self-service:
On the management side, the request goes through these states, recorded in the table datastore.gold_requests: pending (request recorded), running (generation started on Prefect), completed or failed.
gold-build-pipeline deployment. If the catalog-worker restarts, it automatically resumes the requests left waiting.pending, check that the catalog-worker pod is active in the datastore namespace and read its logs.failed, read the run log in the Prefect interface and report the dataset involved. Known limitations: categorical variables cannot yet be aggregated in reconciliation (issue #218).To be completed. The procedure is not yet documented in the sources nor tested (point 3 of Points under verification). The outline, following the CloudNativePG restore mechanism:
Backup resources of the CloudNativePG operator.bootstrap.recovery) reading from the same object storage, indicating the restore point in time if required. The restore is never performed over the cluster in operation.The same procedure applies to the OpenMetadata database, which contains the researchers' accounts.
To be completed. The credentials involved for the database and the Datastore are generated and stored by the Pulumi code of the maps-infrastruttura repository (pulumi/datastore_secrets.py, pulumi/db_secrets.py) and projected as Kubernetes secrets in the datastore namespace. Before rotating them, the realignment of the infrastructure code must be done (point 5 of Points under verification). The outline:
Frequency of rotations and exact commands: to be completed.
To be completed as regards automatic notification, which does not appear to be configured in the sources. The checks available today:
| What to check | Where | How often |
|---|---|---|
Outcome of the nightly catalogue flows (om-snapshot-pipeline at 02:00, sync-from-om-pipeline and bronze-fs-sync at 03:00) | Prefect interface | every day |
Gold requests in failed or stuck in pending | Prefect interface; table datastore.gold_requests | every week, or upon report |
| Outcome of the daily backups | Backup resources of the CloudNativePG operator | every week |
| Free space on the database disk (250 GiB) | volume metrics in the DigitalOcean control panel | every week, and after bulk loads |
| Pipeline status per dataset | project ETL dashboard (D2.3.1) | after each load |
| User reports | ClickUp channel «Datastore – Feedback e segnalazioni» and dataset cards | continuous |
The disk space check has a precedent: on 18/05/2026 the disk filled up during a transformation and was enlarged (see log).
The support requests and the interventions on the database and on the Datastore, in date order. Requests arrive by e-mail or in the ClickUp channel «Datastore – Feedback e segnalazioni», active since 30/06/2026.
| Date | Request | Intervention | Outcome |
|---|---|---|---|
| 15/05/2026 | Prepare the cluster for the Datastore | Datastore namespace and secrets in the infrastructure code; permission to create roles granted to the database application user, needed for the migrations of the Datastore roles (maps-infrastruttura, commits e86ca45, e66a7b8, c1adda1) | Completed; integrated on 18/05/2026 |
| 18/05/2026 | Database disk full during a transformation | Volume increased to 250 GiB; WAL archiving made parallel (commit 0b71289) | Resolved; no data loss reported |
| 22/05/2026 | Replace the manually issued tokens with access through the project identity | Access with OpenMetadata credentials (issue #55); authentication service secret in the cluster (commit 3459974) | Completed |
| 28/05/2026 | GST requests, for the GSSI researchers, even consultation-only access to understand the structure and functions of the platform | Access not granted because the Datastore was still under development; a sequence of screenshots of the standard operations (filters, selection of variables, download) was sent | Closed with illustrative material |
| 11–12/06/2026 | Slow catalogue with several concurrent users (about 28 seconds per response) | Catalogue views turned into materialised views (issue #165, v0.37.0) | Resolved: response under one second |
| 23/06/2026 | GST requests the enabling of seven GST and GSSI users | OpenMetadata accounts created, also valid for the Datastore; credentials sent individually on 24/06/2026 | Completed on 24/06/2026; receipt confirmed by the users |
| 30/06/2026 | Organise user reports | Defined the ClickUp «Datastore» list (datasets cleared for use) and the «Datastore – Feedback e segnalazioni» channel; removed the duplicate ClickUp space | Completed |
| 10/07/2026 | Enabling of a further GST user | Account created; a first-login problem solved | Access to OpenMetadata and Datastore confirmed on 11/07/2026 |
| 04/09/2026 | A GSSI researcher reports, on 147 datasets filtered by municipal granularity and «Silver validato» quality: datasets classified as municipal but with data only for provincial capitals, insufficient historical depth, datasets to be merged | Clarified that the reference is the datasets that have passed the quality check, not those marked «Silver validato»; pointed to the historical depth filter already available; planned the «Capoluogo di provincia» level and the display of the verification status | Verification status in the catalogue on 05/09/2026 (v0.48.0); «Capoluogo di provincia» level on 25/09/2026 (v0.50.3); clarification meeting on 09/09/2026 |
| 05–06/09/2026 | Defect in Gold generation: for EAV data, the values of different years were summed | Filter by year when reading the EAV rows, read-only verification script for the tables involved (v0.48.1) | Resolved. Origin of the report and Gold tables to be regenerated: to be verified |
| 17–22/09/2026 | GST requests an update on loading and quality checks | Communicated that new datasets have passed the check and that the status is visible in the catalogue | Meeting not needed; GST awaits the completion notice |
| 25/09/2026 | Communication of the updates to users | «Stato dataset» filter, selection of multiple values per filter, «Capoluogo di provincia» level; a training session offered | On 28/09/2026 the users reply that the tool is clear and training is not needed |
| 01/10/2026 | Close the trial staging environment set up in December 2025, unused since January 2026 and not aligned with the repository | Services stopped; cold archive of the data downloaded and verified with SHA256 checksums; data removed from the server, Docker network and DNS records removed; rebuild instructions in the decommissioning documentation in the gst-maps-pipelines repository | Decommissioned. The archive is kept locally: it must be moved to a shared encrypted archive if it is to be kept long-term |