Skip to content

Reference#

This reference page documents the objects that can be passed to a custom check function.

For example, the Model object documented below is passed to all check functions. The custom check function can use the attributes of the model class to write assertions about the model.

from checkers import Model

def check_model_descriptions(model: Model):
  assert model.description is not None

Model #

Represents a model in a dbt project

columns: Dict[str, Column] #

Dictionary containing details about each column defined in the model's yaml file

description: Optional[str] = None #

The model's description

fqn: List[str] #

An array containing the fully qualified database name of the model

manifest: Manifest #

The Manifest object. Useful for querying the node's parents, children, etc.

meta: Dict[str, Any] #

The meta config property of the model

name: str #

The name of the model

original_file_path: Path #

The path to the file that defined the node, relative to the dbt_project's directory

resource_type: str #

The resource type. Can be model, test, seed, etc.

source_names: List[List[str]] = Field(alias='sources') #

Array containingg tuples of the sources referenced by the model.

tags: List[str] #

The tags of the model

unique_id: str #

The unique id of the model

Test #

column_name: Optional[str] = None #

The name of the column this test is defined on, if it's a column-level test

manifest: Manifest #

The Manifest object. Useful for querying the node's parents, children, etc.

original_file_path: Path #

The path to the file that defined the node, relative to the dbt_project's directory

resource_type: str #

The resource type. Can be model, test, seed, etc.

test_metadata: Dict[str, Any] = dict() #

Additional data about the test, such as its name, namespace, and arguments specified

test_name #

The name of the test, eg unique, not_null, etc

unique_id: str #

The unique id of the model

Source #

Represents a source in a dbt project

manifest: Manifest #

The Manifest object. Useful for querying the node's parents, children, etc.

original_file_path: Path #

The path to the file that defined the node, relative to the dbt_project's directory

Manifest #

child_map: Dict[str, List[str]] #

Dictionary mapping node_id's to nodes directly downstream

nodes: Dict[str, Dict] #

Dictionary mapping node_id's to node details.

parent_map: Dict[str, List[str]] #

Dictionary mapping node_id's to nodes directly upstream

raw: Dict[str, Any] #

Dictionary containg the raw manifest details