What is the output of the following dbt command when using slim CI with state comparison?
dbt build --state path/to/previous_run --select state:modified
Assume the previous run had models A, B, and C, and only model B was modified.
dbt build --state path/to/previous_run --select state:modified
Think about what 'state:modified' selects in dbt.
The --select state:modified flag tells dbt to build only models that have changed since the last run, plus their dependencies. Since only model B was modified, only B and its dependencies are built.
Given a dbt project with 10 models where 3 models were modified since the last run, how many models will be built using:
dbt build --state path/to/previous_run --select state:modified
Assuming no dependencies outside these 3 models.
dbt build --state path/to/previous_run --select state:modified
Consider if dependencies affect the count here.
Since the 3 modified models have no dependencies, only those 3 models are built.
What error will occur when running this command?
dbt build --state path/to/previous_run --select state:modified+ --exclude state:modified
dbt build --state path/to/previous_run --select state:modified+ --exclude state:modified
Think about what happens when you select and exclude the same models.
The command tries to select models modified and their children, but excludes the modified models themselves, causing a conflict in selection logic.
You want to optimize your CI pipeline to only run tests on changed models and their dependencies. Which dbt command should you use?
Consider how to include dependencies of modified models.
The state:modified+ selector includes modified models and their children, ensuring tests run on all affected models.
Which of the following is a limitation of using slim CI with state comparison in dbt?
Think about how state files affect detection of changes.
If the state files are not up to date, indirect changes in dependencies might not be detected, causing some models to be skipped.