Another quick lesson. These short lessons are not necessarily the whole story, but should be enough to get you started on actually building or modeling your Data Vault. As with all quick lessons, always check your work against the source systems and feeds you receive. Look for all the possible missing pieces, watch the scope of the project or task, and try not to make it over-complicated.
To get from a Star Schema data model (as a data warehouse) to a Data Vault you might take the following steps. There are several reasons you might go this direction, ranging from scalability, to auditability, to flexibility. Most folks who want better flexibility find the Data Vault model easier to work with.
- Locate the one or more fields in the dimensions that constitute the Business Keys.
- If the fields are “independent” of each other, make them in to separate Hubs. If they are all co-dependent, then they become a single Hub. Remember: separate the keys for hierarchical representations. If the Dimesnions don’t carry business keys, you’ll have to go back to the source systems BEFORE the transformations were made and find the proper business keys.
- Take the FACT tables foreign keys (from the dimensions) and build Link structures. HOWEVER: just because all the foreign keys are sitting in a FACT table doesn’t necessarily mean they equate 1 for 1 with the Links… If the foreign keys in the fact table were combined for convenience, then they need to be “unwound” or “deconstructed”. Go back to the source systems, look at the relationships and pull the “sets of keys” apart. Relationships in Links do not represent the “aggregate view” like Star Schemas do, they represent the source system relationships.
- Go to the dimensional data, separate it by “type” or business key dependency. Some dimensional/descriptive data will be placed in a Satellite off one Hub, while other dimensional data (specifically hierarchical) will be in a different Satellite off another Hub. IF you build multiple Hubs / Satellites from a single dimension then you should also build new link tables to represent the Hierarchical relationship between the two business keys.
- Go to the Fact data that is NOT computed (could also be degenerate dimension data), and move it to a Satellite hanging off the appropriate Link tables. Remember, if the keys were broken into multiple Links, then the rest of the descriptive data must be broken into respective Satellites hanging off the Links. Also remember, we do not put aggregated or computed data attributes in the Data Vault (at least for now). A good guide is to review the source model, and look at the incoming transactions. If they are comprised of multiple keys – then those key sets can stay together in a single Link in the Data Vault.
Remember to always check your resulting Data Vault model against the source systems and against the requirements. This is just a simple guideline for getting your effort kick started. Also remember to think about “unwinding” all the transformation that is going in to the data in the Star Schema, because we want RAW data to be loaded to the Data Vault Model – so the model will most likely change.
Have hints/tips/suggestions? Add a reply or comment.
Hope this helps,