Skip to content

chore(dbt): normalize data_tests + document COALESCE ambiguity (int_densite_sectorielle_commune) - #91

Merged
GMartin-Data merged 1 commit into
mainfrom
chore/dbt-densite-yaml-cleanup
Jun 3, 2026
Merged

GMartin-Data merged 1 commit into
mainfrom
chore/dbt-densite-yaml-cleanup

Conversation

@GMartin-Data

Copy link
Copy Markdown
Owner

Contexte

Deux drifts mineurs identifiés dans l'audit audit-interface-contract-intermediate-territorial.md
(chantier mart unifié, 2026-05-19), sur le modèle int_densite_sectorielle_commune. Issues
tech-debt/documentation scope dbt, sans dépendance avec le chantier en cours.

Changements

Un seul fichier touché : dbt/models/intermediate/contexte_territorial/_contexte_territorial__models.yml.

Validation

$ uv run dbt parse
Running with dbt=1.11.7
Registered adapter: bigquery=1.11.1
# -> compile OK, data_tests: correctement interprété, ERROR=0

dbt parse est la validation déterministe ici : les deux issues touchent de la
config/documentation, pas la logique des tests (not_null inchangés). Aucun test data
nouveau, donc pas de dbt build requis pour prouver la non-régression.

Refs

Closes #75
Closes #77

…ensite_sectorielle_commune)

- Normalize legacy 'tests:' to 'data_tests:' on the 4 columns of
  int_densite_sectorielle_commune, aligning with the modern dbt 1.x syntax
  already used by the sibling models in the same file (closes #75).
- Document the NULL-vs-0 ambiguity on nb_etablissements_it and
  effectifs_salaries_it: the staging COALESCE(.., 0) (D39) makes a 0
  indistinguishable from missing upstream data (closes #77).

Validated with 'dbt parse' (dbt 1.11.7): YAML compiles, no errors.

Closes #75
Closes #77
@ESNAULTQ
ESNAULTQ self-requested a review June 3, 2026 07:23

@ESNAULTQ ESNAULTQ left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moi, PERSONNELEMENT, QUENTIN PREMIER DU NOM, t'autorises à merge cette PR

@GMartin-Data
GMartin-Data merged commit 43c0811 into main Jun 3, 2026
6 checks passed
@GMartin-Data
GMartin-Data deleted the chore/dbt-densite-yaml-cleanup branch June 3, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants