This page describes how write your own macros to replace existing macros provided in dbtvault.
Every macro in dbtvault first calls adapter.dispatch to find platform specific implementations of the macro to execute.
Here is an example:
1 2 3 4 5 6 7
This snippet contains the magic, the
get_dbtvault_namespaces() which is defined as follows:
1 2 3 4
To override the hub macro and ensure dbt uses your own implementation of it, you simply need to provide your project's name to the
1 2 3 4 5 6 7 8
With this variable, an implementation of the
hub macro could be defined in your own project as follows:
1 2 3 4 5
...and that's it! Yay!
Please ensure you read the adapter.dispatch docs for more details.