A Tecton 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.
|Returns the description of the Tecton object.|
|Returns the unique id of the Tecton object.|
|List[str]||Join keys of the entity.|
|Returns the name of the Tecton object.|
|Returns the owner of the Tecton object.|
|Returns the tags of the Tecton object.|
|Returns the workspace that this Tecton object belongs to.|
|Declare a new Entity.|
|Displays a human readable summary of this Feature View.|
|Validate this Tecton object and its dependencies (if any).|
Declare a new Entity.
str) – Unique name for the new entity.
bool) – If True, this Tecton object will be blocked from being deleted or re-created (i.e. a destructive update) during tecton plan/apply. To remove or update this object, prevent_destroy must be first set to False via a separate tecton apply. prevent_destroy can be used to prevent accidental changes such as inadvertantly deleting a Feature Service used in production or recreating a Feature View that triggers expensive rematerialization jobs. prevent_destroy also blocks changes to dependent Tecton objects that would trigger a recreate of the tagged object, e.g. if prevent_destroy is set on a Feature Service, that will also prevent deletions or re-creates of Feature Views used in that service. prevent_destroy is only enforced in live (i.e. non-dev) workspaces. (Default:
None]) – Names of columns that uniquely identify the entity in Feature View’s SQL statement for which features should be aggregated. Defaults to using
nameas the entity’s join key.
TectonValidationError– if the input non-parameters are invalid.
from tecton import Entity
customer = Entity(
description="A customer subscribing to a Sports TV subscription service",
Displays a human readable summary of this Feature View.
Validate this Tecton object and its dependencies (if any).
Validation performs most of the same checks and operations as
Check for invalid object configurations, e.g. setting conflicting fields.
For Data Sources and Feature Views, test query code and derive schemas. e.g. test that a Data Source’s specified s3 path exists or that a Feature View’s SQL code executes and produces supported feature data types.
Objects already applied to Tecton do not need to be re-validated on retrieval
fv = tecton.get_workspace('prod').get_feature_view('my_fv')) since they
have already been validated during
tecton plan. Locally defined objects (e.g.
my_ds = BatchSource(name="my_ds", ...)) may need to be validated before some
of their methods can be called, e.g.