SageMakerFeatureStoreRuntime / Client / put_record
put_record#
- SageMakerFeatureStoreRuntime.Client.put_record(**kwargs)#
The
PutRecordAPI is used to ingest a list ofRecordsinto your feature group.If a new record’s
EventTimeis greater, the new record is written to both theOnlineStoreandOfflineStore. Otherwise, the record is a historic record and it is written only to theOfflineStore.You can specify the ingestion to be applied to the
OnlineStore,OfflineStore, or both by using theTargetStoresrequest parameter.You can set the ingested record to expire at a given time to live (TTL) duration after the record’s event time,
ExpiresAt=EventTime+TtlDuration, by specifying theTtlDurationparameter. A record levelTtlDurationis set when specifying theTtlDurationparameter using thePutRecordAPI call. If the inputTtlDurationisnullor unspecified,TtlDurationis set to the default feature group levelTtlDuration. A record levelTtlDurationsupersedes the group levelTtlDuration.See also: AWS API Documentation
Request Syntax
response = client.put_record( FeatureGroupName='string', Record=[ { 'FeatureName': 'string', 'ValueAsString': 'string', 'ValueAsStringList': [ 'string', ] }, ], TargetStores=[ 'OnlineStore'|'OfflineStore', ], TtlDuration={ 'Unit': 'Seconds'|'Minutes'|'Hours'|'Days'|'Weeks', 'Value': 123 } )
- Parameters:
FeatureGroupName (string) –
[REQUIRED]
The name or Amazon Resource Name (ARN) of the feature group that you want to insert the record into.
Record (list) –
[REQUIRED]
List of FeatureValues to be inserted. This will be a full over-write. If you only want to update few of the feature values, do the following:
Use
GetRecordto retrieve the latest record.Update the record returned from
GetRecord.Use
PutRecordto update feature values.
(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) –
A list of stores to which you’re adding the record. By default, Feature Store adds the record to all of the stores that you’re using for the
FeatureGroup.(string) –
TtlDuration (dict) –
Time to live duration, where the record is hard deleted after the expiration time is reached;
ExpiresAt=EventTime+TtlDuration. For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide.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.AccessForbidden