Datavault - hard rules (rawvault) vs soft rules (businessvault)

旧时模样 提交于 2021-01-29 18:38:41

问题


I have a question on hard rules (rawvault) and soft rules (businessrules).

The example I have is a source system has a denormalized table called Pets where Pets contain Cats, Dogs, and Birds where they are distinguished by a Type Code (1 – cat, 2 – dog, 3 – birds).

My question is regarding hard rules vs soft rules when loading the data into the Rawvault vs business vault. When loading the Pets table, can you create a h_cat, h_dog, and h_bird hub in the rawvault and filter the source table pets base on the Type Code of 1 into h_cat, type code 2 into h_dog and type code 3 into h_bird? Is this a hard rule or a soft rule?

Or

Should we be creating a h_pet hub in the rawvault keeping the data as close to the source as possible creating the h_cat, h_dog, and h_bird in the businessvault when filter the data based on type code because this would be classified as a soft rule?


回答1:


I think I'd go with the second approach to stay as close as possible to the source data structure.

Then split the tables in the business vault if needed. This also doesn't need to comply to the Data Vault model, I suppose. In the end the main question is how you want to use the data. If for reporting then I suppose a virtual cube would work as well.




回答2:


If your case you would have a single hub for all three animal types. Any logic that changes the data is added after the raw vault.

Here's a good distinction between soft rules and hard rules:

Hard Rules

These should be applied before data is stored in the DataVault. Any rules applied here do not alter the contents or the granularity of the data, and maintains auditability.

  • Data typing
  • Normalization / Denormalization
  • Adding system fields (tags)
  • De-duplication
  • Splitting by record structure
  • Trimming spaces from character strings

Soft Rules

Rules that change, or interpret the data, for example adds business logic. This changes the granularity of the data.

  • Concatenating name fields
  • Standardizing addresses
  • Computing monthly sales
  • Coalescing
  • Consolidation


来源:https://stackoverflow.com/questions/51645253/datavault-hard-rules-rawvault-vs-soft-rules-businessvault

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!