Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

laurinehu
Copy link
Contributor

🥝 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

@laurinehu laurinehu self-assigned this Jan 30, 2025
@laurinehu laurinehu changed the title feat: enrichissement et nettoyage de tables + documentation feat: table accompagnateurs + enrichissement et nettoyage de tables + documentation Jan 30, 2025
Copy link
Contributor

@ikarius ikarius left a 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,
Copy link
Contributor

@ikarius ikarius Feb 6, 2025

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)

Copy link
Contributor Author

@laurinehu laurinehu Feb 7, 2025

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

Copy link
Contributor

@jbuget jbuget left a 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- name: int_accompagnateurs
- name: int_prescribers

description:
Catégories de services.

- name: int_service_fundinglabels
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- name: int_service_fundinglabels
- name: int_service_funding_labels

description:
Vues de pages par les utilisateurs.

- name: int_searchview_user
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- name: int_searchview_user
- name: int_user_search_views

description:
Orientations des utilisateurs vers des services.

- name: int_pageview_user
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- name: int_mobilisationevent_user
- name: int_user_mobilization_events

description:
Labels des structures de services.

- name: int_serviceview_user_service
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- name: int_serviceview_user_service
- name: int_user_service_views

description:
Vues de services par les utilisateurs.

- name: int_structure_labels
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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')) }},
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{ dbt_utils.star(relation_alias='struct_member', from=ref('int_structure_member')) }},
{{ dbt_utils.star(relation_alias='struct_member', from=ref('int_structure_members')) }},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants