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

(DA-3938) feat(dbt): Add movie label to offer_metadata #3679

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mripoll-pass
Copy link
Contributor

DA PR

Describe your changes

Please include a summary of the changes:

  • This PR adds an intermediate model to the seed table gsheet_movie_arthouse_and_heritage_label (cleaning columns and keeping only relevant ones), and adds movie_label to offer_metadata model.
  • Tag a reviewer if necessacy @mvey-pass @Jules-Arbelot

Type of change

  • Fix (non-breaking change which corrects expected behavior)
  • New fields (non-breaking change)
  • New table (non-breaking change)
  • Concept change (potentially breaking change which modifies fields according to new or evolving business concepts)
  • Table deletion (potentially breaking change which adds functionality/ table)

Checklist before requesting a review

  • I have performed a self-review of my code
  • Fields have been snake_cased
  • I have checked my modifications don't break downstream models
  • If my changes concern incremental table, I have altered their schema to accomodate with field's creation/deletion
  • I have made corresponding changes to the tables documentation
  • I have made corresponding changes to the fields glossary
  • I have updated the dag in cases of dependencies
  • My code passes CI/CD tests
  • I will post on slack review channel and ensure to specify the duration of the review task: short (<10min), medium (<30min), long (>30min)

PR title format (except for MEP)

There is a linter on the PR title format. Please respect the following format:

(ticket) type(topic): comment
  • ticket surrounded by parenthesis, with optionnaly a hyphen followed by one or more digits (e.g., -1234). The first part must be one of the following strings:

    • DA
    • DE
    • AE
    • DS
    • HF
    • BSR
    • PC
  • type :
    The second part to specify the type of change one of the following :

    • build
    • lint
    • ci
    • docs
    • feat
    • fix
    • perf
    • refactor
    • test
    • core
    • dbt
  • topic within parenthesis: 1 word e.g., (dag)

  • comment: tell us your life

examples:

  • ✅ (DE-124) refactor(firebase): update source field
  • ❌ (DE-124) refactor (firebase): update source field (space between type and topic)
  • ❌ (DE-124) airflow(firebase): update source fiedd in DAG (wrong type)
  • ❌ (DE-124) (DE-124) refactor(firebase refacto): update source field (topic in two words)
  • ✅ (BSR) docs(github): add PR title valid format in template

@@ -0,0 +1,8 @@
select
movie_status as movie_label,
split(movie_visa, '.')[offset(0)] as movie_visa,
Copy link
Contributor

Choose a reason for hiding this comment

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

Privilégier le safe_cast en excluant les valeurs "nan" pour que ça fonctionne :)

@@ -159,4 +162,7 @@ left join
{{ ref("int_applicative__product_mediation") }} as pm
on o.offer_product_id = pm.product_id
left join {{ ref("int_applicative__product") }} as p on o.offer_product_id = p.id
left join
{{ ref("int_seed__movie_arthouse_and_heritage_label") }} as mahl
Copy link
Contributor

Choose a reason for hiding this comment

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

il y a certains visas qui ont deux lignes dans la table raw (2 lignes pour un même visa et un même movie_status), j'ai peur que ça duplique des lignes sur cette table non ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

je ne garde qu'une ligne dans le modèle int_seed__movie_arthouse_and_heritage_label en faisant un QUALIFY donc on devrait éviter les doublons

movie_distributor,
cast(movie_release_date as date) as movie_release_date,
safe_cast(safe_cast(movie_visa as float64) as string) as movie_visa
from {{ source("seed", "gsheet_movie_arthouse_and_heritage_label") }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

raw

Copy link

sonarqubecloud bot commented Jan 8, 2025

- name: offer_isbn
description: "{{ doc('column__isbn') }}"
- name: offer_visa
description: "{{ doc('column__visa') }}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

offer_visa

@@ -26,6 +26,12 @@ models:
description: "{{ doc('column__offer_type_id') }}"
- name: offer_sub_type_id
description: "{{ doc('column__offer_sub_type_id') }}"
- name: offer_isbn
description: "{{ doc('column__isbn') }}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

offer_isbn

Copy link
Collaborator

@cdelabre-pass cdelabre-pass left a comment

Choose a reason for hiding this comment

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

comments

@vbusson-pass vbusson-pass force-pushed the master branch 2 times, most recently from 174fb91 to a57b4fc Compare January 29, 2025 08:09
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