Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
### Runner
- expanded config overrides logging
- added config validation
- added owner attribute to GroupMetadata class

## 2.0.7 - 2025-04-15
### Runner
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ GroupMetadata
frequency: Schedule # generation frequency
description: str # group description
key: List[str] # group primary keys
owner: str # owner of the group data (table)
fs_name: str = None # actual table name of this feature group in DataBricks
features: List[str] = None # A list of feature names belonging to this group
```
Expand Down
6 changes: 4 additions & 2 deletions rialto/metadata/data_classes/group_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class GroupMetadata:
frequency: Schedule
description: str
key: List[str]
owner: str
fs_name: str = None
features: List[str] = None

Expand All @@ -42,7 +43,7 @@ def __repr__(self) -> str:
f"name={self.name!r}, frequency={self.frequency!r}, "
f"feature store name={self.fs_name!r},"
f"description={self.description!r}, key={self.key!r}, "
f"features={self.features!r}"
f"features={self.features!r}, owner={self.owner!r}"
")"
)

Expand All @@ -65,7 +66,7 @@ def to_tuple(self) -> Tuple:
"""
if not self.fs_name:
self.fs_name = class_to_catalog_name(self.name)
return (self.name, self.frequency.value, self.description, self.key, self.fs_name)
return (self.name, self.frequency.value, self.description, self.key, self.fs_name, self.owner)

@classmethod
def from_spark(cls, schema: Row) -> Self:
Expand All @@ -81,4 +82,5 @@ def from_spark(cls, schema: Row) -> Self:
frequency=Schedule[schema.group_frequency],
description=schema.group_description,
key=schema.group_key,
owner=schema.group_owner
)
7 changes: 5 additions & 2 deletions tests/metadata/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
StructField("group_description", StringType(), False),
StructField("group_key", ArrayType(StringType(), True), False),
StructField("group_fs_name", StringType(), False),
StructField("group_owner", StringType(), False),
]
)

Expand All @@ -35,8 +36,8 @@
)

group_base = [
("Group1", "weekly", "group1", ["key1"], "group_1"),
("Group2", "monthly", "group2", ["key2", "key3"], "group_2"),
("Group1", "weekly", "group1", ["key1"], "group_1", "owner_1"),
("Group2", "monthly", "group2", ["key2", "key3"], "group_2", "owner_2"),
]

feature_base = [
Expand All @@ -50,6 +51,7 @@
frequency=Schedule.weekly,
description="group1",
key=["key1"],
owner="owner_1",
)

group_md2 = GroupMetadata(
Expand All @@ -58,6 +60,7 @@
frequency=Schedule.monthly,
description="group2",
key=["key2", "key3"],
owner="owner_2",
features=["Feature1", "Feature2"],
)

Expand Down