Using macros in dbtvault – Satellites

Satellites in dbtvault

Welcome back to our series of videos introducing dbtvault, in which we are showing you dbtvault tips and tricks, aimed particularly at beginners. This is the fourth video in the series “Using macros provided in dbtvault”. Alex, the lead developer of dbtvault, will show you how to create a satellite in dbtvault and show you the lineage of all data flowing to the created satellite.

This is a continuation from the third video and Alex assumes that you have a stage view created using the dbtvault stage macro as well as the hub + link that he showed us in the second and third video – as the steps to create a satellite are very similar. If you missed that video, we suggest you go back and watch the first three videos, as this will make it easier to follow and understand.

First video – Staging

Second video – Hubs

Third video – Links

In this video we are creating a satellite called “ORDER_CUSTOMER_DETAILS”. We start off by creating a satellite folder, within the raw vault folder. This is a good practice to keep things tidy and organised. Once this has been created, Alex copies his SQL code from the Hub which he created earlier as it has a lot of similarities although it is a little more complicated and proceeds to edit the code – which is faster than typing it all out again. One key change is changing the “nk” (natural key) to “hashdiff” – which isn’t a list or string but a mapping.

Now that the metadata has been provided, we need to change the macro call for the dbtvault macro from the hub macro to the link macro. You can find the code he is using in the dbtvault documentation or just type it out as shown in the video. You can find the dbtvault documentation here.

Near the end of the video – Alex opens snowflake to demonstrate the created satellite and generated documentation to show you the lineage of all the data flowing to the satellite “CUSTOMER_ORDER_DETAILS” Lastly, we offer support for dbtvault – which you can find out more about by clicking here.

This is a quote to show the style and font size.

Tags:
,