Dbtvault macro for loading HUB from two different source with different number of BKs


Using dbtvault how do I load a HUB from two different sources with different number of BKs. One source uses 3 part composite BK and the other system uses a 4 part composite BK.

Please advise. Thanks.

cc: @alex.higgs

Currently unsupported out of the box. You would need to create a view which unions the two feeds together yourself (this is what dbtvault does internally anyway), and then add some logic to handle this edge case. The feed with the 3 part BK would then need a 4th always-NULL column to match the 4-part BK and allow the UNION.

Any thoughts on how you would like this to work if it were supported by dbtvault?

I am wondering why you would ever try to combine these in the same hub???
3 v 4 composite keys implies different grain and semantics and should not be loaded to the same hub table at all which of course breaks the standard

I thought this as well actually. It sounds like it should be modelled differently

1 Like

Hi @patrickcuba . Why does it imply a different semantic grain?

I think it’s in my book where I discus how to define hub tables, please review