Repository navigation
fix(support,registry): compose mart-only come support e nel catalogo - #569
Merged
Merged
Conversation
Un support type: dataset con tabelle mart a years esplicite falliva sempre: il resolver cercava mart/<dataset>/<anno>/<tabella>.parquet, mentre il runner multi-anno scrive mart/<dataset>/<tabella>.parquet. Stessa correzione per mart_by_table. Aggiunti tre test (output misti, resolve, file mancante).
{support.X.path} con repo+slug+layer restava il template {year}: reso con
l'anno del run, puntava all'anno sbagliato quando il support è a un anno
diverso (anac 2023 in un compose 2026). Con un solo anno il path è ora
risolto; multi-anno resta template (usare .clean).
Un dataset mart-only non ha clean, quindi il registry non derivava columns: join_suggestions non trovava chiavi semantiche (pil-intelligence, legal-graph, partecipate_entities). La card usa la prima tabella mart non-interna; le colonne passano dallo stesso arricchimento (role/semantic_type) del clean.
- compose mart-only: le colonne del catalogo vengono dalla prima tabella mart
non-internal; lo staging va marcato internal
- {support.X.path} e {support.X.clean}: comportamento single vs multi-anno
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sintesi
Tre fix emersi costruendo il compose
partecipate_entitiesdel repopartecipate-monitor. Senza questi, un dataset derivato non può usare un altro dataset comesupportné essere visto dal catalogo.Contesto collegato
Nessuna issue: emersi dal lavoro sul compose
partecipate-monitor#feat/compose-partecipate-entities.Cosa cambia
support: mart multi-anno sono flat.
_support_expected_mart_outputscercavamart/<dataset>/<anno>/<tabella>.parquetper ogni tabella, ma il runner multi-anno scrivemart/<dataset>/<tabella>.parquet. Qualsiasi dataset con una tabella ayearsesplicite non poteva essere usato cometype: datasetsupport. Stessa correzione permart_by_table.support: path external a un anno. Con
repo+slug+layere un solo anno,{support.X.path}restava il template{year}e veniva reso con l'anno del run, non con l'anno della fonte. Un compose 2026 che legge ANAC 2023 apriva silenziosamente il file 2026. Ora con un solo anno il path è risolto; multi-anno resta template (usare.clean).registry: colonne dei compose mart-only. Il builder non derivava
columnsper i mart-only, quindijoin_suggestionsnon trovava chiavi semantiche. Ora le legge dal primo mart non-interno (la tabella-card:mart_hub,mart_legal_nodes,mart_partecipate_entities).Impatto su contratti pubblici
Nessuna modifica a
dataset.yml, path output o schema parquet.dataset.ymlIl registry dei dataset mart-only guadagna
columns(additivo):pil-intelligenceelegal-graphoggi hanno 0 colonne e diventeranno joinabili. Nessuna rottura per i dataset con clean.Verifica
pytest tests/test_support.py tests/test_registry_builder.py tests/test_schema_reader.py tests/test_catalog_ops.py -q # 167 passed ruff check toolkit/registry/schema_reader.py toolkit/registry/builders.py tests/test_registry_builder.pyVerifica end-to-end sul compose reale (
partecipate-monitor):toolkit registry build --prefix partecipate-pubbliche --out /tmp/regtest --write # partecipate_entities: columns 16, cf -> fiscal_code, mart_refs 3Test aggiunti