SCD2 для dim_customers

This commit is contained in:
2025-11-07 15:10:30 +03:00
parent 42c8515b62
commit b29de24c31
3 changed files with 114 additions and 63 deletions
+5 -4
View File
@@ -1,4 +1,5 @@
customer_id,email,phone,city
101,a@ex.com,700,Москва
101,b@ex.com,700,Москва
102,c@ex.com,701,СПб
customer_id,email,phone,city,_load_id,load_ts
101,a@ex.com,700,Москва,batch_20250405_0800,2025-04-05 08:00
102,c@ex.com,701,СПб,batch_20250405_0800,2025-04-05 08:00
101,b@ex.com,700,Москва,batch_20250405_1200,2025-04-05 12:00
101,b@ex.com,700,Санкт-Петербург,batch_20250405_1800,2025-04-05 18:00
1 customer_id email phone city _load_id load_ts
2 101 a@ex.com 700 Москва batch_20250405_0800 2025-04-05 08:00
3 101 102 b@ex.com c@ex.com 700 701 Москва СПб batch_20250405_0800 2025-04-05 08:00
4 102 101 c@ex.com b@ex.com 701 700 СПб Москва batch_20250405_1200 2025-04-05 12:00
5 101 b@ex.com 700 Санкт-Петербург batch_20250405_1800 2025-04-05 18:00