Repository navigation
chore(dbt): normalize data_tests + document COALESCE ambiguity (int_densite_sectorielle_commune) - #91
Merged
Conversation
…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
self-requested a review
June 3, 2026 07:23
ESNAULTQ
reviewed
Jun 3, 2026
ESNAULTQ
left a comment
Collaborator
There was a problem hiding this comment.
Moi, PERSONNELEMENT, QUENTIN PREMIER DU NOM, t'autorises à merge cette PR
ESNAULTQ
approved these changes
Jun 3, 2026
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.
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. Issuestech-debt/documentationscope dbt, sans dépendance avec le chantier en cours.Changements
Un seul fichier touché :
dbt/models/intermediate/contexte_territorial/_contexte_territorial__models.yml.tests:→data_tests:sur les 4 colonnes du modèle. Aligne sur lasyntaxe dbt 1.x déjà utilisée par les modèles voisins du même fichier
(
int_tensions_bassin_emploi). Aucun changement de comportement (les deux syntaxes sontéquivalentes en dbt 1.11) — seul le mot-clé change.
nb_etablissements_iteteffectifs_salaries_it: leCOALESCE(.., 0)du staging (D39) rend un0indistinguabled'une donnée manquante amont. Doc uniquement, pas de refonte du COALESCE.
Validation
dbt parseest la validation déterministe ici : les deux issues touchent de laconfig/documentation, pas la logique des tests (
not_nullinchangés). Aucun test datanouveau, donc pas de
dbt buildrequis pour prouver la non-régression.Refs
Closes #75
Closes #77