-
Notifications
You must be signed in to change notification settings - Fork 2
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: table accompagnateurs + enrichissement et nettoyage de tables + documentation #210
base: main
Are you sure you want to change the base?
Conversation
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.
De ce que j'en vois, ça m'a l'air très bien.
Mais pour le détail, je pense que mon avis n'est pas (encore) pertinent pour les aspects DBT
@@ -13,8 +14,6 @@ final AS ( | |||
email, | |||
last_name, | |||
first_name, | |||
is_valid, | |||
is_staff, |
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.
nit : d'une manière générale, pour du reporting pourquoi on laisse les is_staff
? (à moins que ce soit filtré ailleurs)
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.
on ne les garde pas ! c'est bien filtré ici, ligne 7, donc stg_user
ne contient que les users hors staff
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.
issue: Je propose de normer le nom des tables en les mettant au pluriel
@@ -0,0 +1,50 @@ | |||
models: | |||
- name: int_accompagnateurs |
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.
- name: int_accompagnateurs | |
- name: int_prescribers |
description: | ||
Catégories de services. | ||
|
||
- name: int_service_fundinglabels |
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.
- name: int_service_fundinglabels | |
- name: int_service_funding_labels |
description: | ||
Vues de pages par les utilisateurs. | ||
|
||
- name: int_searchview_user |
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.
- name: int_searchview_user | |
- name: int_user_search_views |
description: | ||
Orientations des utilisateurs vers des services. | ||
|
||
- name: int_pageview_user |
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.
- name: int_pageview_user | |
- name: int_user_page_views |
Accompagnateurs avec le label national de leur structure. | ||
`user_id` n'est pas une clé d'unicité étant donné qu'un utilisateur peut avoir de 0 à n labels. | ||
|
||
- name: int_mobilisationevent_user |
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.
- name: int_mobilisationevent_user | |
- name: int_user_mobilization_events |
description: | ||
Labels des structures de services. | ||
|
||
- name: int_serviceview_user_service |
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.
- name: int_serviceview_user_service | |
- name: int_user_service_views |
description: | ||
Vues de services par les utilisateurs. | ||
|
||
- name: int_structure_labels |
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.
- name: int_structure_labels | |
- name: int_structure_national_labels |
Labels nationaux associés aux structures. | ||
`structure_id` n'est pas une clé d'unicité étant donné qu'une structure peut avoir de 0 à n labels. | ||
|
||
- name: int_structure_member |
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.
- name: int_structure_member | |
- name: int_structure_members |
SELECT | ||
{{ dbt_utils.star(relation_alias='struct_member', from=ref('int_structure_member')) }}, | ||
struct_labels.national_label_name | ||
FROM {{ ref('int_structure_member') }} AS struct_member |
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.
FROM {{ ref('int_structure_member') }} AS struct_member | |
FROM {{ ref('int_structure_members') }} AS struct_member |
@@ -0,0 +1,7 @@ | |||
SELECT | |||
{{ dbt_utils.star(relation_alias='struct_member', from=ref('int_structure_member')) }}, |
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.
{{ dbt_utils.star(relation_alias='struct_member', from=ref('int_structure_member')) }}, | |
{{ dbt_utils.star(relation_alias='struct_member', from=ref('int_structure_members')) }}, |
🥝 Besoin
Créer des indicateurs de suivi des accompagnateurs.
🍅 Solution
Création à partir de la table
structure_member
d'une table filtrée sur les accompagnateurs et accompagnateurs_offreurs, ajout du label national de la structure pour pouvoir identifier les accompagnateurs FT, CD etc.🍇 Autre
J'en profite pour faire un peu de ménage et documenter les tables intermediate