-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(pipeline) : Ajout d'un premier modèle pour monitorer la qualité des données #259
Merged
Conversation
This file contains 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
vmttn
reviewed
Jul 24, 2024
pipeline/dbt/models/intermediate/quality/int_quality__stats.sql
Outdated
Show resolved
Hide resolved
vperron
force-pushed
the
vperron/quality-dashboard
branch
from
July 25, 2024 10:44
51cb444
to
eb27546
Compare
vperron
force-pushed
the
vperron/quality-dashboard
branch
from
July 26, 2024 10:57
eb27546
to
e81d717
Compare
vperron
force-pushed
the
vperron/quality-dashboard
branch
2 times, most recently
from
July 26, 2024 13:40
508c602
to
dd46e04
Compare
vmttn
reviewed
Jul 31, 2024
vperron
force-pushed
the
vperron/quality-dashboard
branch
2 times, most recently
from
August 2, 2024 16:22
c6792cc
to
fae1755
Compare
vmttn
approved these changes
Aug 5, 2024
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.
quelques petits nits, je te laisse voir
pipeline/dbt/models/intermediate/quality/int_quality__stats.sql
Outdated
Show resolved
Hide resolved
pipeline/dbt/models/intermediate/quality/int_quality__stats.sql
Outdated
Show resolved
Hide resolved
pipeline/dbt/models/intermediate/quality/int_quality__stats.sql
Outdated
Show resolved
Hide resolved
A refactoring commit 7 months ago did deactivate those by mistake. Let's re-enable them.
The 'services' table has an implicit dependency to the 'structures' mart as its constraint enforces a check on its structure_id key towards that table. Make sure DBT knows about it so it generates the structures first. Referenced by dbt-labs/dbt-core#8062, might be fixed in dbt-labs/dbt-common#163 last week but: - not released - not documented - not sure the commit will actually help when I read it, needs more changes I suppose
Those will be useful for our further analysis, or even if we wanted to base our Metabase requests on the actual API contents instead of the marts.
A prior investigation showed that for two different sources, we could find trailing spaces in quite a few lines. This is now cleaned, but would also be nice to have a test.
It makes more sense this way and keeps the rest of the sources consistent.
First working version before we attemp going further (snapshotting, improvements on the ODSPEP or other sources, values per column counts, etc) data-inclusion=# SELECT * FROM public_intermediate.int_quality__stats ORDER BY source, stream; date_day | source | stream | count_raw | count_stg | count_int | count_marts | count_api | count_contacts | count_addresses ------------+-----------------------+------------------------+-----------+-----------+-----------+-------------+-----------+----------------+----------------- 2024-08-02 | action_logement | services | 26 | 23 | 2760 | 2760 | 2760 | 0 | 2760 2024-08-02 | action_logement | structures | 123 | 120 | 120 | 120 | 120 | 0 | 120 2024-08-02 | agefiph | services | 31 | 31 | 27 | 27 | 27 | 0 | 27 2024-08-02 | cd35 | organisations | 3545 | 3545 | 3545 | 3544 | 3540 | 2594 | 3422 2024-08-02 | cd72 | services | 474 | 463 | 463 | 260 | 0 | 0 | 0 2024-08-02 | cd72 | structures | 217 | 217 | 217 | 213 | 457 | 41 | 394 2024-08-02 | data_inclusion | services | 47 | 44 | 44 | 44 | 44 | 17 | 21 2024-08-02 | data_inclusion | structures | 22 | 19 | 19 | 19 | 19 | 0 | 19 2024-08-02 | dora | services | 17717 | 11707 | 11707 | 11036 | 11034 | 8430 | 10160 2024-08-02 | dora | structures | 8554 | 8554 | 8554 | 8545 | 8538 | 3260 | 8342 2024-08-02 | emplois_de_linclusion | organisations | 8589 | 8589 | 15824 | 15821 | 15821 | 7041 | 15712 2024-08-02 | emplois_de_linclusion | siaes | 7235 | 7235 | 15824 | 15821 | 15821 | 7041 | 15712 2024-08-02 | france_travail | agences | 888 | 888 | 888 | 888 | 886 | 0 | 886 2024-08-02 | france_travail | services | 28 | 25 | 22200 | 22200 | 22150 | 0 | 22150 2024-08-02 | mediation_numerique | services | 20798 | 19445 | 19445 | 19424 | 19417 | 8158 | 19417 2024-08-02 | mediation_numerique | structures | 20798 | 19445 | 19445 | 19424 | 19417 | 8158 | 19417 2024-08-02 | mes_aides | aides | 690 | 690 | 960 | 947 | 916 | 217 | 914 2024-08-02 | mes_aides | garages | 908 | 908 | 870 | 863 | 847 | 163 | 845 2024-08-02 | monenfant | creches | 84597 | 13481 | 13481 | 13479 | 13466 | 11098 | 13466 2024-08-02 | odspep | DD009_RES_PARTENARIALE | 28262 | 6438 | 9001 | 8717 | 8618 | 0 | 6591 2024-08-02 | reseau_alpha | formations | 388 | 388 | 388 | 388 | 297 | 239 | 269 2024-08-02 | reseau_alpha | structures | 757 | 757 | 757 | 752 | 752 | 538 | 667 2024-08-02 | soliguide | lieux | 22028 | 22028 | 22028 | 22028 | 21980 | 0 | 21980
vperron
force-pushed
the
vperron/quality-dashboard
branch
from
August 5, 2024 14:36
b9df406
to
3600b92
Compare
vmttn
approved these changes
Aug 6, 2024
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.
top
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.
Première version d'un modèle de "qualité" qui permet d'afficher la qualité des données.
Output actuel sur les données du 22 Juillet:
Il n'y a plus trop de bizarreries, mais il reste un petit souci sur les données API du CD72 puisque le fix est dans cette PR ^^
Comme d'habitude, il vaut vraiment mieux relire dans l'ordre et commit par commit, ils sont théoriquement tous atomiques et indépendants. Les 4 premiers sont plutôt utilitaires/nettoyage.
Le modèle
int_quality__stats
est "intermédiaire" car:marts
ont une obligation de respect d'un contrat de donnéesSi cela convient dans les grandes lignes, je propose les étapes suivantes:
import_data_inclusion_api
pour que les données API soient celles du jour et pas J-1?)