Resultο
Classes
|
|
|
|
|
|
|
|
|
Store information of the result from a contract execution. |
|
- class dbt_contracts.contracts.result.Result(*, name: str, path: Path | None, result_type: str, result_level: str, result_name: str, message: str, properties_path: Path | None = None, properties_start_line: int | None = None, properties_start_col: int | None = None, properties_end_line: int | None = None, properties_end_col: int | None = None, parent_id: str | None = None, parent_name: str | None = None, parent_type: str | None = None, index: int | None = None)ο
Bases:
BaseModelConfig,GenericStore information of the result from a contract execution.
- name: strο
- path: Path | Noneο
- result_type: strο
- result_level: strο
- result_name: strο
- message: strο
- properties_path: Path | Noneο
- properties_start_line: int | Noneο
- properties_start_col: int | Noneο
- properties_end_line: int | Noneο
- properties_end_col: int | Noneο
- parent_id: str | Noneο
- parent_name: str | Noneο
- parent_type: str | Noneο
- index: int | Noneο
- resource_type: ClassVar[type[ItemT]]ο
- property has_parent: boolο
Was this result built using a parent item.
- classmethod from_resource(item: I, parent: P = None, properties: PropertiesIO = None, **kwargs) Selfο
Create a new
Resultfrom a given resource.- Parameters:
item β The resource to log a result for.
parent β The parent item that the given child
itembelongs to if available.properties β The properties IO handler to use when loading properties files.
- Returns:
The
Resultinstance.
- as_github_annotation() Mapping[str, str]ο
Format this result to a GitHub annotation. Raises an exception if the result does not have all the required parameters set to build a valid GitHub annotation.
- property can_format_to_github_annotation: boolο
Can this result be formatted as a valid GitHub annotation.
- class dbt_contracts.contracts.result.ModelResult(*, name: str, path: Path | None, result_type: str, result_level: str, result_name: str, message: str, properties_path: Path | None = None, properties_start_line: int | None = None, properties_start_col: int | None = None, properties_end_line: int | None = None, properties_end_col: int | None = None, parent_id: str | None = None, parent_name: str | None = None, parent_type: str | None = None, index: int | None = None)ο
Bases:
Result- resource_typeο
alias of
ModelNode
- class dbt_contracts.contracts.result.SourceResult(*, name: str, path: Path | None, result_type: str, result_level: str, result_name: str, message: str, properties_path: Path | None = None, properties_start_line: int | None = None, properties_start_col: int | None = None, properties_end_line: int | None = None, properties_end_col: int | None = None, parent_id: str | None = None, parent_name: str | None = None, parent_type: str | None = None, index: int | None = None)ο
Bases:
Result- resource_typeο
alias of
SourceDefinition
- class dbt_contracts.contracts.result.ColumnResult(*, name: str, path: Path | None, result_type: str, result_level: str, result_name: str, message: str, properties_path: Path | None = None, properties_start_line: int | None = None, properties_start_col: int | None = None, properties_end_line: int | None = None, properties_end_col: int | None = None, parent_id: str | None = None, parent_name: str | None = None, parent_type: str | None = None, index: int | None = None)ο
Bases:
Result,Generic- resource_typeο
alias of
ColumnInfo
- classmethod from_resource(item: ColumnInfo, parent: P = None, properties: PropertiesIO = None, **kwargs) Selfο
Create a new
Resultfrom a given resource.- Parameters:
item β The resource to log a result for.
parent β The parent item that the given child
itembelongs to if available.properties β The properties IO handler to use when loading properties files.
- Returns:
The
Resultinstance.
- class dbt_contracts.contracts.result.MacroResult(*, name: str, path: Path | None, result_type: str, result_level: str, result_name: str, message: str, properties_path: Path | None = None, properties_start_line: int | None = None, properties_start_col: int | None = None, properties_end_line: int | None = None, properties_end_col: int | None = None, parent_id: str | None = None, parent_name: str | None = None, parent_type: str | None = None, index: int | None = None)ο
Bases:
Result- resource_typeο
alias of
Macro
- class dbt_contracts.contracts.result.MacroArgumentResult(*, name: str, path: Path | None, result_type: str, result_level: str, result_name: str, message: str, properties_path: Path | None = None, properties_start_line: int | None = None, properties_start_col: int | None = None, properties_end_line: int | None = None, properties_end_col: int | None = None, parent_id: str | None = None, parent_name: str | None = None, parent_type: str | None = None, index: int | None = None)ο
Bases:
Result- resource_typeο
alias of
MacroArgument
- classmethod from_resource(item: MacroArgument, parent: Macro = None, properties: PropertiesIO = None, **kwargs) Selfο
Create a new
Resultfrom a given resource.- Parameters:
item β The resource to log a result for.
parent β The parent item that the given child
itembelongs to if available.properties β The properties IO handler to use when loading properties files.
- Returns:
The
Resultinstance.