Creating and Registering Entities¶
Entities are the underlying objects that features and feature views are associated with. They encapsulate the join keys
used for feature lookups. To create a new entity and register it in the feature store, use the feature store’s
register_entity
method.
from snowflake.ml.feature_store import Entity
entity = Entity(
name="MY_ENTITY",
join_keys=["UNIQUE_ID"],
desc="my entity"
)
fs.register_entity(entity)
To see all the registered entities in your feature store, use the feature store’s list_entities
method,
which returns a Snowpark DataFrame.
fs.list_entities().show()
You can retrieve a previously registered entity using the get_entity
method, for example to obtain its join keys.
entity = fs.get_entity(name="MY_ENTITY")
print(entity.join_keys)
Known Limitations¶
Entities are tags, and so are subject to the limit of 10,000 tags per account and 50 unique tags per object.