Formatters

Inheritance diagram of dbt_contracts.formatters.ResultsFormatter

Implementations for formatters of objects for the purposes of logging.

Classes

ResultsFormatter()

Base class for implementations which format a set of Result objects to a string for displaying results.

class dbt_contracts.formatters.ResultsFormatter

Bases: BaseModelConfig, Generic

Base class for implementations which format a set of Result objects to a string for displaying results. Usually used to format results for logging purposes. This allows for the separation of how results should be formatted for logging purposes from their implementations.

abstractmethod add_results(results: Collection) → None

Format the given results and update the stored output to be built.

Parameters:

results – The results to format.

abstractmethod build() → str

Build the output and return it. This clears the stored output.

Modules

table