This is a companion discussion topic for the original entry at How We Calculate Time on Task, the Business Hours Between Two Dates | dbt Developer Blog
Thanks for the incredibly helpful article and repo! I have an interesting issue I’m running into. When I create the ‘attempt-2-subquery’ macro, I am unable to change the names of either macros and have it run successfully in any model. ie. If I keep the names the same as you have defined them (working_min_between, business_minutes_between__2) dbt is able to locate the macro and run it. However if I change the names to something like ‘working_minutes’ and ‘business_minutes_final’, dbt can’t find the macros under those names. I haven’t run into any issues like this in naming macros before. Do you have a possible explanation on why this is happening?