tecton.declarative.Entity¶
-
class
tecton.declarative.Entity(*, name, description=None, tags=None, owner=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
FeatureViewcontains 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', owner='matt@tecton.ai', tags={'release': 'development'})
Methods
Declare a new Entity.
-
__init__(*, name, description=None, tags=None, owner=None, join_keys=None)¶ Declare a new Entity.
- Parameters
name (
str) – Unique name for the new entity.description (
Optional[str]) – Short description of the new entity.tags (
Optional[Dict[str,str]]) – Tags associated with this Tecton Object (key-value pairs of arbitrary metadata).owner (
Optional[str]) – Owner name (typically the email of the primary maintainer).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. Defaults to usingnameas the entity’s join key.
- Raises
TectonValidationError – if the input parameters are invalid.
Attributes
join_keysJoin keys of the entity.
nameName of the entity.
-