# How do i build the Business Vault with dbtvault?

**URL:** https://forum.data-community.org/t/how-do-i-build-the-business-vault-with-dbtvault/35
**Category:** AutomateDV
**Tags:** automatedv
**Created:** [December 7, 2021, 11:44am UTC](https://forum.data-community.org/t/how-do-i-build-the-business-vault-with-dbtvault/35 "2021-12-07T11:44:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![johnoscott](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.data-community.org/johnoscott/32/16_2.png) [@johnoscott](https://forum.data-community.org/u/johnoscott)
#### Post date: [December 7, 2021, 11:44am UTC](https://forum.data-community.org/t/how-do-i-build-the-business-vault-with-dbtvault/35/1 "2021-12-07T11:44:53Z")

</div>

How does one go about implementing a **Business Vault** using dbtvault ? I have some _business_ (soft) _rules_ that can be nicely implemented as dbt models but I am wondering how they should be configured and orchestrated.

---

<div class="post-metadata">

### Author: ![neil.strange](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.data-community.org/neil.strange/32/407_2.png) [@neil.strange](https://forum.data-community.org/u/neil.strange)
#### Post date: [December 7, 2021, 4:41pm UTC](https://forum.data-community.org/t/how-do-i-build-the-business-vault-with-dbtvault/35/2 "2021-12-07T16:41:30Z")

</div>

We create a model holding a particular business vault rule’s SQL code. This should generate a staging layer table. Add to the SQL additional fields to make up the metadata needed for the staging layer - record source (the business rule), load datetime, etc.

That staging layer table is now ready to load straight back into the Data Vault by first priming the stage (adding any hashdiffs or other metadata columns not yet calculated) and mapping using hub, link, satellite or other models as needed.

With dbt dependencies ({{reference}}) we now have a chain - Raw Vault load, followed by the business rules and further Data Vault loads. If business rules depend on the output of other business rules add further layers of dependencies as needed.

---

<div class="post-metadata">

### Author: ![alex.higgs](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.data-community.org/alex.higgs/32/434_2.png) [@alex.higgs](https://forum.data-community.org/u/alex.higgs)
#### Post date: [December 7, 2021, 7:20pm UTC](https://forum.data-community.org/t/how-do-i-build-the-business-vault-with-dbtvault/35/3 "2021-12-07T19:20:57Z")

</div>

Further, it’s logical to equate 1 Business Rule to 1 dbt Macro.

If put your logic for a business rule into a macro, your team can re-use the macro to assign the same business rule. If needed, you could put checks in to throw exceptions if they’re using it incorrectly, and more. Having the business rule in a macro also makes it far more test-able.

---

<div class="post-metadata">

### Author: ![RhysHanscombe](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.data-community.org/rhyshanscombe/32/394_2.png) [@RhysHanscombe](https://forum.data-community.org/u/RhysHanscombe)
#### Post date: [November 25, 2025, 3:59pm UTC](https://forum.data-community.org/t/how-do-i-build-the-business-vault-with-dbtvault/35/4 "2025-11-25T15:59:16Z")

</div>


