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

[Mon recap] Modification de la source du barometre de mon recap + ajout du département sur toutes les tables #383

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

YannickPassa
Copy link
Contributor

@YannickPassa YannickPassa commented Dec 17, 2024

**Carte Notion : **

Pourquoi ?

  • Airtable se synchronisait très mal avec tally, changement de la source de table baromètre (mainenant sur gsheet).
  • Ajout du département sur toutes les tables
  • Création d'une xxxx_v0 pour les tables provenant d'une source externe à la db, cela permettra de faire des modifs en sql et non en python + nous recevrons ainsi les tables "presque" brutes

Checks

  • J'ai lancé le modèle ou seed sur un dump local (si pertinent)
  • J'ai ajouté des tests à mon code Python, ou des assertions DBT sur le modèle SQL
  • J'ai documenté ce modèle voire certains de ses champs (usage métier, tableau de bord, etc)

@YannickPassa YannickPassa force-pushed the YannickPassa/sources_monrecap branch 2 times, most recently from 25bbc7e to 31f2a95 Compare December 17, 2024 20:16
@YannickPassa YannickPassa self-assigned this Dec 17, 2024
@YannickPassa YannickPassa force-pushed the YannickPassa/sources_monrecap branch from 31f2a95 to f705858 Compare December 17, 2024 21:02
Copy link
Contributor

@laurinehu laurinehu left a comment

Choose a reason for hiding this comment

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

good!

drop table if exists monrecap.barometre cascade;"""
)

tables = ["Commandes", "Contacts", "Baromètre - Airflow"]
table_mapping = {"Commandes": "Commandes_v0", "Contacts": "Contacts_v0"}
tables = ["Commandes", "Contacts"]
for table_name in tables:
Copy link
Contributor

Choose a reason for hiding this comment

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

tu pourrais enlever ligne 32 et faire for table_name in tables.keys()

(bonne pratique pr pas avoir besoin de changer deux lignes si tu traites plus de tables demain)

@@ -37,15 +39,22 @@ def monrecap_airtable(**kwargs):
df["Nom Departement"] = df["Code Postal"].apply(
lambda cp: "-".join([item for item in departments.get_department(cp) if item is not None])
)
if table_name == "Contacts":
elif table_name == "Contacts":
# fixing Annaelle's double quotes, if you read this I'll get my revenge
Copy link
Contributor

Choose a reason for hiding this comment

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

😂

Copy link
Contributor

Choose a reason for hiding this comment

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

attends je bug ton if devient un elif ? il manque un if avant non ?

Copy link
Contributor

Choose a reason for hiding this comment

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

JAI RIEN DIT - j'ai oublié de cliquer sur un bouton

@@ -37,15 +39,22 @@ def monrecap_airtable(**kwargs):
df["Nom Departement"] = df["Code Postal"].apply(
lambda cp: "-".join([item for item in departments.get_department(cp) if item is not None])
)
if table_name == "Contacts":
elif table_name == "Contacts":
# fixing Annaelle's double quotes, if you read this I'll get my revenge
Copy link
Contributor

Choose a reason for hiding this comment

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

JAI RIEN DIT - j'ai oublié de cliquer sur un bouton

@YannickPassa YannickPassa added this pull request to the merge queue Dec 18, 2024
Merged via the queue into main with commit 1676330 Dec 18, 2024
5 checks passed
@YannickPassa YannickPassa deleted the YannickPassa/sources_monrecap branch December 18, 2024 08:32
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.

2 participants