Skip to content

check_model_naming_conventions

This check ensures a model follows the standard naming conventions.

Models should use one of the following prefixes to describe their layer of the transformation pipeline.

  • int_, for models in the intermediate layer
  • stg_, for models in the staging layer
  • fct_ or dim_ for models in the marts layer
  • rpt_ for models that serve as reports, usually in the marts layer

Version History

Added in Debby v0.3.0

Parameters

This check does not support any custom parameters.

Info

For more information about how to set custom parameters for a check, see the documentation on configuration.

Source

def check(model: dict):
    naming_prefixes = ["int_", "stg_", "fct_", "dim_", "rpt_"]
    uses_naming_prefix = any([model["name"].startswith(p) for p in naming_prefixes])
    assert uses_naming_prefix