I’m new to this forum and relatively new to Data Vault modeling and data warehousing. I’m working on a project and would love some guidance from the experts here.
Context:
I have an Employee Hub that stores external business keys (Employee IDs) from an external platform.
I need to store the role type of each employee (e.g., Manager, Developer) and want to track changes to this role over time.
Currently, I don’t have any employee satellite, just the hub for the employee ID, Context:
I have an Employee Hub that stores external business keys (Employee IDs) from an external platform.
I need to store the role type of each employee (e.g., Manager, Developer) and want to track changes to this role over time.
Currently, I don’t have any other descriptive data in the employee satellite, just the hub for the employee ID, because we don’t receive any info from employee only the external key.
My Question:
Should I:
Create a Satellite (e.g., SAT_EMPLOYEE_ROLE_TYPE) attached to the Employee Hub to store the role type and track its changes?
Or, should I create a separate Hub for Role Type (e.g., HUB_ROLE_TYPE) and then link it to the Employee Hub using a Link table?
Additional Info:
The role type information is currently specific to employees.
I need to ensure historical tracking for role changes.
I’d appreciate any advice on best practices and how to model this effectively.
Would you consider Role Type a business entity or is this a descriptive attribute of the employee?
HUBs should only really be used to capture business entities.
Where do you get the Role Type information from as you state that you only receive the external key (Employee ID)?
Personally, from what you have provided so far I would create a HUB SAT called SAT_Employee and include Role Type as an attribute within that SAT and then track changes accordingly. If you have additional attribute information regarding the employee then you could possibly include them in this SAT too.
Thanks for your help. Basically I receive only information of that external Id and the Role in a SP and I need to insert this in the correct way.
What they said to me is that the same Employee could be assigned to different roles on the exact same Order, so the Link Table should store information about the employee role and employee. With this scenario will the the HUB be the best approach?
Basically I have this logical model: HUB Order — LINK — HUB Employee / HUB Employee Role.
Link sat in that case. So an employee may be performing multiple roles on the same order Employee-role may be a link between employee and order so put the description on the link / linksat.
@Nat So basically I can create a link between the 2 hubs (order and employee) and put the name of the role on that link. That way I will have a link satellite correct? What are the benefits from this approach instead of the one I have? Sorry to ask but I’m relative beginner to data vault
You’d need a link between order and employee anyway.
And from what you’re saying, the role is attached only to an employee’s participation in an order. So to me that sounds like a link/link sat.
However, managing time sensitivity between employee and order and role is going to be your trickiest problem, wherever you put the role attribute.
Can an employee play multiple roles at the same time on an order? you might end up having to go down the multi-active satellite route there (these are quite complex, I don’t understand them well). maybe for this case it doesnt’ matter and you can get away with simple time sensitivity.
Employee sounds like a business object and therefore a hub
Role type is NOT a business object but dependent on the existence of the Employee and therefore a dependent–child key… I imagine you will have many more attributes that describe the state of that employee by role type and therefore the dependent-child key should be loaded to a satellite table. I have a blog scheduled for 8 Oct describing how a multi-active satellite, a satellite with a dependent-child key and a regular satellite table differ.
@patrickcuba Thanks for the help and sorry for the late response.
Yes Order have a business key in the Hub_Order.
We will not store employee info into the vault. We only store the external id in the Hub_Employee and the role of that employee in the Hub_Employee_Role.
The same Employee could have different Roles for one specific Order.
Because now I have a hub_employee_role that store the role but this is incorrect because if I ingest the same file again where the role have not change I will have the error of: “Cannot insert duplicate key in object hub_employee_role” because the hub_employee_role only stores the name of the role.
Regarding the satellite I have a satellite that is linked to the hub_order and this hub is linked to the hub_employee and hub_employee_role (1 link that holds the 2 hubs hash keys).
Whit this scenario what will be the best approach?
I’m sorry for the confusion @patrickcuba but I haven’t used anything yet, I don’t know how to use it (dependent–child key), in the link? on the satellite? I’m relative new to this concepts Because the employee hub is connected to the order hub and does not have an associated satellite, only order hub.
Sorry for the confusion but I’m trying to understand how to use this dependent child key (I’ve already been reading your book and everything and it’s been very useful).