...

/

Overview of Packages

Overview of Packages

Learn about dbt packages and what they’re used for.

What are packages?

Packages are collections of dbt logic that can be reused for efficient project development. They’re used to share reusable SQL code, macros, tests, and models.

Instead of copy-pasting code snippets, we can import packages into our project. This feature helps analytics engineers follow the DRY engineering principle. In addition, they make projects smaller, more specific, and ultimately more maintainable. Instead of having all of the logic in one project, logic is divided into several packages, making the end project much more readable and straightforward.

Pros and cons of dbt packages

Pros ✅

Cons ❌

  • Packages encapsulate reusable code and allow users to leverage built-in components in their projects.
  • Packages promote standardization and consistency because logic is isolated from the project.
  • Maintenance time is reduced because most packages are maintained by a group of users.
  • Packages facilitate collaboration, both internally between teams and with the dbt community, as users can contribute to other packages.


  • The use of packages can lead to complex dependency managagement, and dependency conflicts might occur.
  • Because packages are not native features, not all of them are well tested and maintained on a regular basis.

What can and cannot be imported from packages

Objects that can be imported

The ...

Objects that cannot be imported

The ...