Hey! Hope you’re doing well.
I just wanted to add something that I think might be helpful to this excellent original idea.
The thing is, the on-run-start
hook can add some seconds to each model/test run to apply all the UDFs. In my case, the overall sum of those seconds was around 10-15% of the entire dbt pipeline runtime, and I considered it was too much time for something that is a static thing.
To tackle this, I decided to do the same idea described here, but instead of executing it with the hook, it’s executed in a step of the CI pipeline, in case some file that matches the glob pattern macros/udfs/**/*.sql
is modified. You may need to make some adjustments to your infrastructure (your runners), but it worthed a while for my case.
Thanks!