SageMakerFeatureStoreRuntime / Client / update_record
update_record¶
- SageMakerFeatureStoreRuntime.Client.update_record(**kwargs)¶
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.
Warning
This operation is available only for feature groups that use the
Standard_V2orInMemoryonline store type.The record must already exist. If the record does not exist or has been soft-deleted, the operation returns a
ResourceNotFounderror. To create a record, usePutRecord.If you provide an
EventTimethat is older than the record’s currentEventTime, the service rejects the update with aConflictException. If theEventTimeis equal to or newer than the current value, the service applies the update. If you omitEventTime, the service keeps the record’s existingEventTimeand applies the update.If you specify a
TtlDuration, you must also provide anEventTimein the request. Otherwise, the operation returns aValidationError.See also: AWS API Documentation
Request Syntax
response = client.update_record( FeatureGroupName='string', RecordIdentifierValueAsString='string', Features=[ { 'FeatureName': 'string', 'ValueAsString': 'string', 'ValueAsStringList': [ 'string', ] }, ], TargetStores=[ 'OnlineStore'|'OfflineStore', ], TtlDuration={ 'Unit': 'Seconds'|'Minutes'|'Hours'|'Days'|'Weeks', 'Value': 123 } )
- Parameters:
FeatureGroupName (string) –
[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 (string) –
[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 (list) –
[REQUIRED]
The feature values to write to the record.
(dict) –
The value associated with a feature.
FeatureName (string) – [REQUIRED]
The name of a feature that a feature value corresponds to.
ValueAsString (string) –
The value in string format associated with a feature. Used when your
CollectionTypeisNone. Note that features types can beString,Integral, orFractional. This value represents all three types as a string.ValueAsStringList (list) –
The list of values in string format associated with a feature. Used when your
CollectionTypeis aList,Set, orVector. Note that features types can beString,Integral, orFractional. These values represents all three types as a string.(string) –
TargetStores (list) –
The target stores for the record update. By default, Amazon SageMaker Feature Store updates the record in all stores associated with the
FeatureGroup.(string) –
TtlDuration (dict) –
The time-to-live (TTL) duration for the record. Amazon SageMaker Feature Store deletes the record when
EventTime+TtlDurationelapses. If you omit this parameter, the record’s existing TTL setting remains unchanged. For information aboutHardDelete, see the DeleteRecord operation in the Amazon SageMaker API Reference.Unit (string) – [REQUIRED]
TtlDurationtime unit.Value (integer) – [REQUIRED]
TtlDurationtime value.
- Returns:
None
Exceptions
SageMakerFeatureStoreRuntime.Client.exceptions.ValidationErrorSageMakerFeatureStoreRuntime.Client.exceptions.InternalFailureSageMakerFeatureStoreRuntime.Client.exceptions.ServiceUnavailableSageMakerFeatureStoreRuntime.Client.exceptions.AccessForbiddenSageMakerFeatureStoreRuntime.Client.exceptions.ResourceNotFoundSageMakerFeatureStoreRuntime.Client.exceptions.ConflictException