Hi Venkat,
Good question.
I can only give my opinion as I’m not a qualified Data Vault Practitioner and I’m still learning DV myself.
Please see above for considerations around whether to include Dependent Children in the LINK HASH KEY as well as:
Assuming you include the Dependent Children in the LINK_HASH_KEY, would the following work?
- HUB_Document
- LINK_Document - dependent children of both Document_Line and Document_Sub_Lines included in LINK and the LINK_HASH_KEY
- HUB_SAT_Document
- LINK_SAT_Document_Line - LINK_HASH_KEY and Load Date make up your Primary Key and you include attributes relating to the Document Line
- LINK_SAT_Document_Sub_Lines - LINK_HASH_KEY and Load Date make up your Primary Key and you include attributes relating to the Document Sub Line
Alternatively, if you do not include the Dependent Children in the LINK_HASH_KEY:
- HUB_Document
- LINK_Document - dependent children of both Document_Line and Document_Sub_Lines included in LINK
- HUB_SAT_Document
- LINK_SAT_Document_Line - LINK_HASH_KEY, Document Line ID and Load Date make up your Primary Key (partition)
- LINK_SAT_Document_Sub_Lines - LINK_HASH_KEY, Document_Line ID, Document_Sub_Line ID, Load Date make up your Primary Key (partition). Document_Line ID is required in here so that you can relate, via the LINK, which Document_Sub_Line IDs belong to which Document_Line ID.
You would need to JOIN from your LINK_SATs to your LINK using the LINK_HASH_KEY and the dependent children.
Does that help in any way?
Thanks,
Carl