A package supplies reusable project code.
Declare it in packages.yml and install it with dbt deps before relying on its macros. Pin the version your project has evaluated so an unrelated release doesn't change a build unexpectedly. This simulator bundles a small dbt_utils practice subset; it doesn't contact a package registry.
Inspect the rendered SQL when you use a package macro. A surrogate key needs stable inputs and an explicit NULL convention. A date spine's end boundary matters when you join daily facts.
Star can remove a named field from a projection, and pivot writes conditional aggregates rather than inventing records for missing categories. Expression tests still return rows that violate the predicate. Each task checks the result or test definition, so installing a package alone doesn't complete the transformation.