The problem I’m having
to execute dbt model in loop via macro
The context of why I’m trying to do this
I have lookup table, where we keep track of countries. We need to execute the list of models, for all active countries depending on lookup table, execute these models in sequence.
What I’ve already tried
I created the macro that have array with model names.
and a for loop that will execute depending in lookup table’s count.
But to execute dbt model like dbt run -s modelname.sql, its not working.
can anyone help me with it