tecton.Entity

class tecton.Entity(*, name: str, description: str = '', family: str = '', tags: Dict[str, str] = None, owner: str = '', default_join_keys: Union[str, List[str]] = None, join_keys: Union[str, List[str]] = None)

Declare an Entity, used to organize and join features.

An Entity is a class that represents an Entity that is being modelled in Tecton. Entities are used to index and organize features- a FeaturePackage contains at least one Entity.

Entities contain metadata about join keys, which represent the columns that are used to join features together.

Methods

__init__

Declare a new Entity.

with_join_keys

Returns a new OverriddenEntity object with updated join keys.

__init__(*, name: str, description: str = '', family: str = '', tags: Dict[str, str] = None, owner: str = '', default_join_keys: Union[str, List[str]] = None, join_keys: Union[str, List[str]] = None)

Declare a new Entity.

Parameters
  • name – Unique name for the new entity.

  • default_join_keys – Deprecated. Use join_keys. Names of columns that uniquely identify the entity in FeaturePackage’s SQL statement for which features should be aggregated for.

  • join_keys – Names of columns that uniquely identify the entity in FeaturePackage’s SQL statement for which features should be aggregated for.

  • description – Short description of the new entity.

  • owner – Owner name

Raises

TectonValidationError – if the input parameters are invalid.

with_join_keys(join_keys: Union[str, List[str]]) → tecton.entities.entity.OverriddenEntity

Returns a new OverriddenEntity object with updated join keys. The current entity class is not modified.

Parameters

join_keys – Names of columns that uniquely identify the entity in FeaturePackage’s transformation for which features should be aggregated for. Existing join_keys will be fully ignored.

Raises

TectonValidationError – if the input parameters are invalid.

Attributes

name