MCPcopy Index your code
hub / github.com/feast-dev/feast / Entity

Class Entity

sdk/python/feast/entity.py:28–213  ·  view source on GitHub ↗

An entity defines a collection of entities for which features can be defined. An entity can also contain associated metadata. Attributes: name: The unique name of the entity. value_type: The type of the entity, such as string or float. join_key: A property that

Source from the content-addressed store, hash-verified

26
27@typechecked
28class Entity:
29 """
30 An entity defines a collection of entities for which features can be defined. An
31 entity can also contain associated metadata.
32
33 Attributes:
34 name: The unique name of the entity.
35 value_type: The type of the entity, such as string or float.
36 join_key: A property that uniquely identifies different entities within the
37 collection. The join_key property is typically used for joining entities
38 with their associated features. If not specified, defaults to the name.
39 description: A human-readable description.
40 tags: A dictionary of key-value pairs to store arbitrary metadata.
41 owner: The owner of the entity, typically the email of the primary maintainer.
42 created_timestamp: The time when the entity was created.
43 last_updated_timestamp: The time when the entity was last updated.
44 """
45
46 name: str
47 value_type: ValueType
48 join_key: str
49 description: str
50 tags: Dict[str, str]
51 owner: str
52 created_timestamp: Optional[datetime]
53 last_updated_timestamp: Optional[datetime]
54
55 def __init__(
56 self,
57 *,
58 name: str,
59 join_keys: Optional[List[str]] = None,
60 value_type: Optional[ValueType] = None,
61 description: str = "",
62 tags: Optional[Dict[str, str]] = None,
63 owner: str = "",
64 ):
65 """
66 Creates an Entity object.
67
68 Args:
69 name: The unique name of the entity.
70 join_keys (optional): A list of properties that uniquely identifies different entities
71 within the collection. This currently only supports a list of size one, but is
72 intended to eventually support multiple join keys.
73 value_type (optional): The type of the entity, such as string or float. If not specified,
74 it will be inferred from the schema of the underlying data source.
75 description (optional): A human-readable description.
76 tags (optional): A dictionary of key-value pairs to store arbitrary metadata.
77 owner (optional): The owner of the entity, typically the email of the primary maintainer.
78
79 Raises:
80 ValueError: Parameters are specified incorrectly.
81 """
82 self.name = name
83 if value_type is None:
84 warnings.warn(
85 "Entity value_type will be mandatory in the next release. "

Callers 15

feature_view.pyFile · 0.90
create_entityMethod · 0.90
example_repo.pyFile · 0.90
test_end_to_endFunction · 0.90

Calls

no outgoing calls

Tested by 15

test_end_to_endFunction · 0.72
feast_objectsFunction · 0.72
setup_feature_storeFunction · 0.72
entityFunction · 0.72
test_apply_data_sourceFunction · 0.72