Hello All,
Can you please share your thoughts about dependent key and modeling question in DV 2.0
We have source table about customer and address details. One customer can have multiple addresses.
Background information about source data
Customer ID
100 - Customer A
200 - Customer B
300 - Customer C
Address Type
1 - denotes default billing
2 - denotes shipping address
3 - transaction
4 - locator address
Address Code
Auto incremental number per customer
Customer A - 1, Customer A - 2, Customer A -3
Customer B - 1, Customer B - 2, Customer B - 3, Customer B - 4
Note: One customer can have multiple shipping addresses
Source Customer Address table structure sample:
Customer ID | Address Code | Address Type | address Line 1
100 | 1 | 1 | george st, sydney
100 | 2 | 2 | new castle
100 | 3 | 2 | melbourne
200 | 1 | 1 | london
200 | 2 | 2 | new york
300 | 1 | 1 | brisbane
My initial go to approach to model this scenario:
Hub_Customer
Sat_Customer
Hub_AddressType
Sat_AddressType
Link_Customer_Address
L_Hkey | Hub_customer_Hkey | Hub_AddressType_Hkey | Address Code (dependent key)
Address Code in Link table:
Treating Address Code as a dependent key, since it is auto incremental and have no meaning in business process, but this helps mapping between customer and address type (customer may have many address types (shipping, billing, etc))
Link_SAT_Customer_Address
L_Hkey | Address Line 1 |Address Line 2 | Load datetime |rec source
Question: Do you think this is good approach ? any comments / inputs ?
Appreciated your inputs.
regards,
Rudra