MCPcopy
hub / github.com/feast-dev/feast / _get_table_entity_values

Function _get_table_entity_values

sdk/python/feast/utils.py:935–955  ·  view source on GitHub ↗
(
    table: "FeatureView",
    entity_name_to_join_key_map: Dict[str, str],
    join_key_proto_values: Dict[str, List[ValueProto]],
)

Source from the content-addressed store, hash-verified

933
934
935def _get_table_entity_values(
936 table: "FeatureView",
937 entity_name_to_join_key_map: Dict[str, str],
938 join_key_proto_values: Dict[str, List[ValueProto]],
939) -> Dict[str, List[ValueProto]]:
940 # The correct join_keys expected by the OnlineStore for this Feature View.
941 table_join_keys = [
942 entity_name_to_join_key_map[entity_name] for entity_name in table.entities
943 ]
944
945 # If the FeatureView has a Projection then the join keys may be aliased.
946 alias_to_join_key_map = {v: k for k, v in table.projection.join_key_map.items()}
947
948 # Subset to columns which are relevant to this FeatureView and
949 # give them the correct names.
950 entity_values = {
951 alias_to_join_key_map.get(k, k): v
952 for k, v in join_key_proto_values.items()
953 if alias_to_join_key_map.get(k, k) in table_join_keys
954 }
955 return entity_values
956
957
958def _get_unique_entities(

Callers 1

_get_unique_entitiesFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected