A CI job downloads production's manifest.json into ./prod-artifacts. You want dbt build to compare the current project against those artifacts and build only the modified resources. Complete the command: dbt build --select state:modified ______ ./prod-artifacts
In the exam you type the answer. What counts as correct is below.
WHY
The state selection methods (state:modified, state:new, and their sub-selectors) work by diffing the current project against a manifest.json produced by an earlier dbt invocation. dbt does not find that manifest on its own — the --state flag names the directory that holds the previous run's artifacts, and dbt reads manifest.json from it (plus run_results.json for result: selectors and sources.json for source_status:). Without --state, any selector using a state method fails, because there is no comparison manifest to diff against. The equivalent environment variable is DBT_STATE, which is useful in CI where the path is set once for the whole job. Note that --state is separate from --defer: --defer tells dbt to resolve ref() calls for unselected, unbuilt models to the relations recorded in that manifest, and it also depends on --state (or --defer-state) to know where the manifest lives. So --state supplies the artifacts; --select state:modified decides what to do with the diff.