-
Notifications
You must be signed in to change notification settings - Fork 5
🚪 [ENRICH] Cloturer acteurs cessés/fermés #1454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
042f12d
to
cfdd303
Compare
c24f7f2
to
ed9e27f
Compare
4 tasks
e106fc0
to
ba49c98
Compare
1 task
09afc1d
to
b233cf2
Compare
kolok
approved these changes
Apr 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok pour moi à cndition que le DAG de rafraichissement des modèles DBT ne soit pas cassé.
A itérer selon la pair review
dca5e56
to
947e530
Compare
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.
🚪 Cloturer acteurs cessés/fermés
📦 Grosse PR
Grosse PR car bcp de travail de fond pour de la réutilisation, cf:
Carte Notion 🚪 ANNUAIRE ENTREPRISE: cloturer acteurs cessés/fermés
🗺️ contexte: on a des acteurs qui on arrêter d'éxercer, on a ingéré l'Annuaire Entreprise (AE): #1408
💡 quoi: DAG Airflow qui recherche nos acteurs dans l'AE via
siren/siret
et propose des suggestions de cloturation🎯 pourquoi: résoudre le problème d'acteurs inactifs dans notre DB
🤔 comment:
base_ae_etablissement
, activable viaexport DBT_SAMPLING='true' && dbt ...
), on décide par modèle de ce qu'il y a de plus pertinentacteur_type_code
etsource_code
pour faciliter la revue de donnée et éviter les blending dans python/airflow (qui seraient répétés au lieu d'être centralisés dans dbt)🖼️ UI Django Admin
🚪 Acteurs Fermés: 🔴 non remplacés
🚪 Acteurs Fermés: 🟡 remplacés par SIRET d'un autre SIREN
🚪 Acteurs Fermés: 🟢 remplacés par SIRET du même SIREN
Même que 🚪 Acteurs Fermés: 🟡 remplacés par SIRET d'un autre SIREN avec juste le
parent_reason
qui change🔍 DBT (plus de détails)
Logique de remplacement:
code_postal, adresse, numéro rue et NAF
, priorité au SIRET du même SIRENSuggestions:
WHERE siret_is_from_same_siren IS FALSE
= cohorte de suggestion pour remplacés par un SIRET d'un autre SIRENWHERE siret_is_from_same_siren IS TRUE
= cohorte de suggestion pour remplacés par un SIRET d'un même SIREN📆 Prochaines PRs/tâches
parent_reason
hitoriques (parent_reason="clustering avant {date}")parent_reason
futures (parent_reason="clustering {date} {cluster_id}")