tecton.Entity

class tecton.Entity(*, name, description='', family='', tags=None, owner='', default_join_keys=None, join_keys=None)

Declare an Entity, used to organize and join features.

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

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

Example of an Entity declaration:

from tecton import Entity

customer = Entity(name='churned_customer', join_keys=['customer_id'],
            description='A customer subscribing to a Sports TV subscription service',
            family='sports_channels',
            owner='jules@tecton.ai',
            tags={'release': 'development'})

Methods

__init__

Declare a new Entity.

with_join_keys

Returns a new OverriddenEntity object with updated join keys.

__init__(*, name, description='', family='', tags=None, owner='', default_join_keys=None, join_keys=None)

Declare a new Entity.

Parameters
  • name (str) – Unique name for the new entity.

  • description (str) – Short description of the new entity.

  • family (str) – (Optional) Family of this Entity, used to group Tecton Objects.

  • tags (Optional[Dict[str, str]]) – (Optional) Tags associated with this Tecton Object (key-value pairs of arbitrary metadata).

  • owner (str) – Owner name (typically the email of the primary maintainer).

  • default_join_keys (Union[str, List[str], None]) – Deprecated. Use join_keys. Names of columns that uniquely identify the entity in FeatureView’s SQL statement for which features should be aggregated.

  • join_keys (Union[str, List[str], None]) – Names of columns that uniquely identify the entity in FeatureView’s SQL statement for which features should be aggregated.

Raises

TectonValidationError – if the input parameters are invalid.

with_join_keys(join_keys)

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

Parameters

join_keys (Union[str, List[str]]) – Names of columns that uniquely identify the entity in FeatureView’s transformation for which features should be aggregated. Existing join_keys will be fully ignored.

Raises

TectonValidationError – if the input parameters are invalid.

Attributes

join_keys

Join keys of the entity.

name

Name of the entity.