Subdomain 1.3: Conceptualizing modularity and how to incorporate DRY principles
1.Which command must be run after adding a new entry to `packages.yml` and before that package's macros or models become available in the project?
- A.dbt deps
- B.dbt compile
- C.dbt docs generate
- D.dbt seed
Show answer & explanation
Correct answer: A — dbt deps
- A. This is correct because this command reads `packages.yml`, downloads each listed package into the `dbt_packages` directory, and writes the lock file, which is what makes the package's macros and models resolvable.
- B. This is incorrect because this command only renders the project's Jinja into executable SQL; it does not fetch packages, so a package added to `packages.yml` but never installed would still fail to resolve.
- C. This is incorrect because this command builds the documentation website and catalog from already-compiled project metadata; it has no role in fetching or installing package dependencies.
- D. This is incorrect because this command loads CSV files in the `seeds` directory into the warehouse as tables; it is unrelated to installing packages declared in `packages.yml`.