Skip to content

dbt_meshify#

dbt-meshify is a dbt-core plugin that automates the management and creation of dbt-core model governance features introduced in dbt-core v1.5. Each command in the package will leverage your dbt project metadata to create and/or edit the files in your project to properly configure the models in your project with these governance features.

These dbt-core features include:

  1. Groups - group your models into logical sets.
  2. Contracts - add model contracts to your models to ensure consistent data shape.
  3. Access - control the access level of models within groups
  4. Versions - create and increment versions of particular models.

This package leverages the dbt-core Python API to allow users to use standard dbt selection syntax for each of the commands in this package (unless otherwise noted). See details on each of the specific commands available on the commands page

Basic Usage#

Each of the available commands page allows you to add one (or many) of the above features to a set of models specified by the selection syntax in the command.

The goal of this package is to make it more straightforward to apply to your project so that splitting apart a monolithic project into component projects is a more automated, dbt-tonic experience.

The process of splitting a dbt monolith apart roughly requires you to:

  1. Determine what parts of your project should be grouped together into subprojects
  2. Determine the access-level for the members of that group
  3. Add model contracts to the elements that are public and accessed my members outside the group specified in (1)
  4. (Optional) Add model versions to the public models to allow for development without impacting downstream stakeholders.

Here's how that might look for the process of creating a separate finance subproject in your dbt monolith.

# create a group of all models tagged with "finance"
# leaf nodes and nodes with cross-group dependencies will be `public`
# public nodes will also have contracts added to them
dbt-meshify group finance --owner name Monopoly Man -s +tag:finance

# optionally use the add-version operation to add a new version to a model
dbt-meshify operation add-version -s fct_orders

Future releases of this package may also include features that allow users to fully split off groups of models into entirely new dbt projects.