Tables de dimension
Cette documentation cartographie les tables de dimension (préfixées dim_) du datawarehouse.
Elle décrit l'objectif de chaque table et le format attendu des colonnes (noms et types).
Remarques générales
- Les colonnes
dw_inserted_atetdw_updated_atsont des métadonnées DW (timestamps d'ingestion/mise à jour). - Les colonnes
version,date_from,date_toetis_currentservent à historiser les dimensions (SCD / HOP) lorsque nécessaire.
dim_date
Dimension de date : une ligne par jour. Plage typique : 2010–2150 (ajouter des années si la clock approche 2100).
date_key : int -- YYYYMMDD (ex : 20251126)
full_date : date
year : int
quarter : int
month : int
month_name : string
week_of_year : int
day_of_month : int
day_of_week : int
day_name : string
is_weekend : boolean
dw_inserted_at : timestamp
dw_updated_at : timestamp
version : int = 1
date_from : timestamp = null
date_to : timestamp = null
is_current : boolean
dim_temp
Complément de dim_date pour représenter l'heure/minute d'un événement. La granularité est la minute (secondes = 0 par convention).
time_key : int -- HHmmSS (ex : 083000 pour 08:30:00)
full_time : time
hour : int
minute : int
second : int = 0
am_pm : string -- 'AM' / 'PM'
time_label : string -- 'HH:mm' (ex : '08:30')
dw_inserted_at : timestamp
dw_updated_at : timestamp
dim_categorie
Table vide pour l'instant (workflow HOP non défini).
dim_channel
Table vide pour l'instant (workflow HOP non défini).
dim_client
Référentiel clients (source : application fidélité).
client_key : bigint
id_source : bigint
civilite : string -- {Mme, M, Mx}
nom : string
prenom : string
anniversaire : date
adresse_mail : string
telephone : string
adresse : string
application_source : string
created_at : timestamp
updated_at : timestamp
deleted_at : timestamp
id_client : string -- ex : 'CLIXXXXX'
dw_inserted_at : timestamp
dw_updated_at : timestamp
version : int = 1
date_from : timestamp = null
date_to : timestamp = null
is_current : boolean
dim_entrepot
Référentiel entrepôts.
entrepot_key : bigint
id_source : bigint
nom : string
adresse : string
horaires : string
statut : string
capacite_stockage : bigint
capacite_logistique : bigint
roles_logistiques : string
zone_geographique_desservie : string
responsable_logistique : string
type_entrepot : string
est_gros_volume : boolean
created_at : timestamp
updated_at : timestamp
deleted_at : timestamp
dw_inserted_at : timestamp
dw_updated_at : timestamp
version : int = 1
date_from : timestamp = null
date_to : timestamp = null
is_current : boolean
dim_event_type_sav
Enum des types d'événements d'un ticket SAV.
event_type_key : int
event_code : string
event_libelle : string
ordre_process : int
Exemples :
1 | ARRIVE_DEPOT | Arrivé au dépôt
2 | EN_REPARATION | En réparation
3 | REPARATION_OK | Réparation terminée
4 | EXPEDIE_CLIENT | Expédié au client
dim_exchange_status_sav
Enum des statuts d'échange SAV.
exchange_status_key : int
exchange_status_code : string
exchange_status_libelle : string
dw_inserted_at : timestamp
dw_updated_at : timestamp
Exemples :
1 | en_attente | En attente
2 | echange_en_cours | Échange en cours
3 | echange | Échangé
dim_fournisseur_produits
Table de jointure fournisseur ↔ produit (source : référentiel fournisseurs).
fournisseur_produits_key : int
id_source : bigint
fournisseur_id : int
produit_id : int
prix_fournisseur_cents : int
delai_livraison_jours : int
quantite_minimale_commande : int
reference_fournisseur : string
statut_relation : string
packaging : string
created_at : timestamp
updated_at : timestamp
deleted_at : timestamp
dw_inserted_at : timestamp
dw_updated_at : timestamp
version : int = 1
date_from : timestamp = null
date_to : timestamp = null
is_current : boolean
dim_fournisseurs
Référentiel fournisseurs.
fournisseur_key : int
id_source : int
nom_legal : string
code_fournisseur : string
siret : string
adresse : string
email : string
telephone : string
interlocuteurs : string
documents_contractuel_urls : string
statut : string
statut_contractuel : string
produits_fournis_skus : string
created_at : timestamp
updated_at : timestamp
deleted_at : timestamp
dw_inserted_at : timestamp
dw_updated_at : timestamp
version : int = 1
date_from : timestamp = null
date_to : timestamp = null
is_current : boolean
dim_magasin
Référentiel magasins.
magasin_key : bigint
magasin_id_source : bigint
nom_magasin : string
code_magasin : string
type_magasin : string
surface_vente_m2 : numeric
capacite : int
services : string
statut_magasin : string
manager : string
address : string
dw_inserted_at : timestamp
dw_updated_at : timestamp
version : int = 1
date_from : timestamp = null
date_to : timestamp = null
is_current : boolean
dim_payment_status_sav
Enum des statuts de paiement pour les tickets SAV.
payment_status_key : int
payment_status_code : string
payment_status_libelle : string
dw_inserted_at : timestamp
dw_updated_at : timestamp
Exemples :
1 | en_attente | En attente
2 | paye | Payé
3 | rembourse | Remboursé
4 | paye_par_garantie | Payé par garantie
dim_produit
Référentiel produits.
produit_key : int
produit_id_source : bigint
ean : string
nom : string
marque : string
categorie_principale : string
statut_produit : string
prix_vente_cents : bigint
garantie_jours : int
poids_grammes : int
created_at : timestamp
updated_at : timestamp
dw_inserted_at : timestamp
dw_updated_at : timestamp
version : int = 1
date_from : timestamp = null
date_to : timestamp = null
is_current : boolean
dim_status_ticket_sav
Enum des statuts d'un ticket SAV.
statut_key : int
statut_code : string
statut_libelle : string
statut_groupe : string
est_final : boolean
version : int
date_from : timestamp
date_to : timestamp
is_current : boolean
Exemples :
1 | OUVERT | Ticket ouvert
2 | EN_ATTENTE_LOGISTIQUE | Attente logistique
3 | EN_ATTENTE_RECEPTION | Attente réception
4 | CLOTURE | Ticket clôturé
5 | EN_ATTENTE_EXPEDITION | Attente expédition
dim_ticket_sav
Référentiel tickets SAV.
ticket_key : int
ticket_id_source : bigint
motif : string
app_source : string
created_at : timestamp
close_at : timestamp
deleted_at : timestamp
current_status : string
dw_inserted_at : timestamp
dw_updated_at : timestamp
version : int = 1
date_from : timestamp = null
date_to : timestamp = null
is_current : boolean
dim_status_click_and_collect_orders
Enum des statuts pour les commandes Click & Collect.
status_key : int
status_code : string
status_label : string
created_at : timestamp
updated_at : timestamp
Exemples :
1 | COLLECTED | COLLECTED
2 | READY | READY