I’ve been building some models using staging/intermediate/marts practices. Let’s assume I have some queries in the marts layer that are connected to the intermediate layer, and those queries in the intermediate layer are referenced to the staging layer. Also, let’s assume I run these two commands:
Command 1:
dbt run --vars '{ "prefix": "my_prefix", "filter_value": my_filter_value}'
Command 2:
dbt run --models marts --vars '{ "prefix": "my_prefix", "filter_value": my_filter_value}'
The main difference is that the second command runs only the models in the marts folder. If those models reference any queries in the intermediate layer, they will use the views that are already in the data warehouse. In other words, if I have modified a query in the intermediate layer that feeds one of the marts queries I’m running, that modification will not be included because I did not include the intermediate layer in Command 2. However, if I run Command 1, the modification will be included as dbt will recreate every view from the staging and intermediate layers, including any modifications I have made.
Is my understanding correct? Is there anything I could be missing here?
P.S.: If this is an off-topic question, could you point me to the right community? I couldn’t find a community for dbt similar to Cross Validated for statistics.