Updates one or more feature values for an existing record in the specified feature group¶
Description¶
Updates one or more feature values for an existing record in the specified feature group. Features that you do not include in the request remain unchanged. You can update up to 100 features per call.
This operation is available only for feature groups that use the Standard_V2 or InMemory online store type.
The record must already exist. If the record does not exist or has been soft-deleted, the operation returns a ResourceNotFound error. To create a record, use put_record.
If you provide an EventTime that is older than the record's current EventTime, the service rejects the update with a ConflictException. If the EventTime is equal to or newer than the current value, the service applies the update. If you omit EventTime, the service keeps the record's existing EventTime and applies the update.
If you specify a TtlDuration, you must also provide an EventTime in the request. Otherwise, the operation returns a ValidationError.
Usage¶
sagemakerfeaturestoreruntime_update_record(FeatureGroupName,
RecordIdentifierValueAsString, Features, TargetStores, TtlDuration)
Arguments¶
FeatureGroupName
[required] The identifier for the feature group that contains the record to update. You can specify one of the following:
- The feature group name.
-
The feature group Amazon Resource Name (ARN).
-
RecordIdentifierValueAsString
[required] The value that uniquely identifies the record in the feature group. This must match the value defined by the feature group's record identifier feature.
Features
[required] The feature values to write to the record.
TargetStores
The target stores for the record update. By default, Amazon SageMaker Feature Store updates the record in all stores associated with the FeatureGroup.
TtlDuration
The time-to-live (TTL) duration for the record. Amazon SageMaker Feature Store deletes the record when EventTime + TtlDuration elapses. If you omit this parameter, the record's existing TTL setting remains unchanged. For information about HardDelete, see the delete_record operation in the Amazon SageMaker API Reference.
Value¶
An empty list.
Request syntax¶
svc$update_record(
FeatureGroupName = "string",
RecordIdentifierValueAsString = "string",
Features = list(
list(
FeatureName = "string",
ValueAsString = "string",
ValueAsStringList = list(
"string"
)
)
),
TargetStores = list(
"OnlineStore"|"OfflineStore"
),
TtlDuration = list(
Unit = "Seconds"|"Minutes"|"Hours"|"Days"|"Weeks",
Value = 123
)
)