Skip to content

Commit f34ac66

Browse files
adds docstrings, lints
1 parent e6e6ad5 commit f34ac66

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

src/sagemaker/feature_store/dataset_builder.py

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class TableType(Enum):
4646
@attr.s
4747
class JoinTypeEnum(Enum):
4848
"""Enum of Join types.
49+
4950
The Join comparator can be "INNER_JOIN", "LEFT_JOIN", "RIGHT_JOIN", "FULL_JOIN"
5051
"""
5152

@@ -58,6 +59,7 @@ class JoinTypeEnum(Enum):
5859
@attr.s
5960
class JoinComparatorEnum(Enum):
6061
"""Enum of Join comparators.
62+
6163
The Join comparator can be "EQUALS", "GREATER_THAN", "LESS_THAN",
6264
"GREATER_THAN_OR_EQUAL_TO", or "LESS_THAN_OR_EQUAL_TO"
6365
"""
@@ -87,15 +89,16 @@ class FeatureGroupToBeMerged:
8789
catalog (str): A string representing the catalog.
8890
database (str): A string representing the database.
8991
table_name (str): A string representing the Athena table name of this FeatureGroup.
90-
record_dentifier_feature_name (str): A string representing the record identifier feature.
92+
record_identifier_feature_name (str): A string representing the record identifier feature.
9193
event_time_identifier_feature (FeatureDefinition): A FeatureDefinition representing the
9294
event time identifier feature.
9395
target_feature_name_in_base (str): A string representing the feature name in base which will
9496
be used as target join key (default: None).
9597
table_type (TableType): A TableType representing the type of table if it is Feature Group or
9698
Panda Data Frame (default: None).
9799
feature_name_in_target (str): A string representing the feature in the target feature group
98-
that will be compared to the target feature in the base feature group
100+
that will be compared to the target feature in the base feature group. If None is
101+
provided, the record identifier will be used in the join statement. (default: None).
99102
join_comparator (JoinComparatorEnum): A JoinComparatorEnum representing the comparator used
100103
when joining the target feature in the base feature group and the feature in the target
101104
feature group (default: None).
@@ -134,6 +137,14 @@ def construct_feature_group_to_be_merged(
134137
included in the output.
135138
target_feature_name_in_base (str): A string representing the feature name in base which
136139
will be used as target join key (default: None).
140+
feature_name_in_target (str): A string representing the feature in the target feature group
141+
that will be compared to the target feature in the base feature group. If None is
142+
provided, the record identifier will be used in the join statement. (default: None).
143+
join_comparator (JoinComparatorEnum): A JoinComparatorEnum representing the comparator used
144+
when joining the target feature in the base feature group and the feature in the target
145+
feature group (default: None).
146+
join_type (JoinTypeEnum): A JoinTypeEnum representing the type of join between the base and
147+
target feature groups. (default: None).
137148
Returns:
138149
A FeatureGroupToBeMerged object.
139150
@@ -283,11 +294,19 @@ def with_feature_group(
283294
"""Join FeatureGroup with base.
284295
285296
Args:
286-
feature_group (FeatureGroup): A FeatureGroup which will be joined to base.
297+
feature_group (FeatureGroup): A target FeatureGroup which will be joined to base.
287298
target_feature_name_in_base (str): A string representing the feature name in base which
288-
will be used as target join key (default: None).
299+
will be used as a join key (default: None).
289300
included_feature_names (List[str]): A list of strings representing features to be
290301
included in the output (default: None).
302+
feature_name_in_target (str): A string representing the feature in the target feature group
303+
that will be compared to the target feature in the base feature group. If None is
304+
provided, the record identifier will be used in the join statement. (default: None).
305+
join_comparator (JoinComparatorEnum): A JoinComparatorEnum representing the comparator used
306+
when joining the target feature in the base feature group and the feature in the target
307+
feature group (default: None).
308+
join_type (JoinTypeEnum): A JoinTypeEnum representing the type of join between the base and
309+
target feature groups. (default: None).
291310
Returns:
292311
This DatasetBuilder object.
293312
"""

0 commit comments

Comments
 (0)