SageMakerFeatureStoreRuntime **************************** Client ====== class SageMakerFeatureStoreRuntime.Client A low-level client representing Amazon SageMaker Feature Store Runtime Contains all data plane API operations and data types for the Amazon SageMaker Feature Store. Use this API to put, delete, and retrieve (get) features from a feature store. Use the following operations to configure your "OnlineStore" and "OfflineStore" features, and to create and manage feature groups: * CreateFeatureGroup * DeleteFeatureGroup * DescribeFeatureGroup * ListFeatureGroups import boto3 client = boto3.client('sagemaker-featurestore-runtime') These are the available methods: * batch_get_record * can_paginate * close * delete_record * get_paginator * get_record * get_waiter * put_record SageMakerFeatureStoreRuntime / Client / get_paginator get_paginator ************* SageMakerFeatureStoreRuntime.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. SageMakerFeatureStoreRuntime / Client / can_paginate can_paginate ************ SageMakerFeatureStoreRuntime.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. SageMakerFeatureStoreRuntime / Client / put_record put_record ********** SageMakerFeatureStoreRuntime.Client.put_record(**kwargs) The "PutRecord" API is used to ingest a list of "Records" into your feature group. If a new record’s "EventTime" is greater, the new record is written to both the "OnlineStore" and "OfflineStore". Otherwise, the record is a historic record and it is written only to the "OfflineStore". You can specify the ingestion to be applied to the "OnlineStore", "OfflineStore", or both by using the "TargetStores" request 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 the "TtlDuration" parameter. A record level "TtlDuration" is set when specifying the "TtlDuration" parameter using the "PutRecord" API call. If the input "TtlDuration" is "null" or unspecified, "TtlDuration" is set to the default feature group level "TtlDuration". A record level "TtlDuration" supersedes the group level "TtlDuration". 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 "GetRecord" to retrieve the latest record. * Update the record returned from "GetRecord". * Use "PutRecord" to 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 "CollectionType" is "None". Note that features types can be "String", "Integral", or "Fractional". 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 "CollectionType" is a "List", "Set", or "Vector". Note that features types can be "String", "Integral", or "Fractional". 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]** "TtlDuration" time unit. * **Value** *(integer) --* **[REQUIRED]** "TtlDuration" time value. Returns: None **Exceptions** * "SageMakerFeatureStoreRuntime.Client.exceptions.ValidationError" * "SageMakerFeatureStoreRuntime.Client.exceptions.InternalFailure" * "SageMakerFeatureStoreRuntime.Client.exceptions.ServiceUnavailab le" * "SageMakerFeatureStoreRuntime.Client.exceptions.AccessForbidden" SageMakerFeatureStoreRuntime / Client / batch_get_record batch_get_record **************** SageMakerFeatureStoreRuntime.Client.batch_get_record(**kwargs) Retrieves a batch of "Records" from a "FeatureGroup". See also: AWS API Documentation **Request Syntax** response = client.batch_get_record( Identifiers=[ { 'FeatureGroupName': 'string', 'RecordIdentifiersValueAsString': [ 'string', ], 'FeatureNames': [ 'string', ] }, ], ExpirationTimeResponse='Enabled'|'Disabled' ) Parameters: * **Identifiers** (*list*) -- **[REQUIRED]** A list containing the name or Amazon Resource Name (ARN) of the "FeatureGroup", the list of names of "Feature``s to be retrieved, and the corresponding ``RecordIdentifier" values as strings. * *(dict) --* The identifier that identifies the batch of Records you are retrieving in a batch. * **FeatureGroupName** *(string) --* **[REQUIRED]** The name or Amazon Resource Name (ARN) of the "FeatureGroup" containing the records you are retrieving in a batch. * **RecordIdentifiersValueAsString** *(list) --* **[REQUIRED]** The value for a list of record identifiers in string format. * *(string) --* * **FeatureNames** *(list) --* List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned. * *(string) --* * **ExpirationTimeResponse** (*string*) -- Parameter to request "ExpiresAt" in response. If "Enabled", "BatchGetRecord" will return the value of "ExpiresAt", if it is not null. If "Disabled" and null, "BatchGetRecord" will return null. Return type: dict Returns: **Response Syntax** { 'Records': [ { 'FeatureGroupName': 'string', 'RecordIdentifierValueAsString': 'string', 'Record': [ { 'FeatureName': 'string', 'ValueAsString': 'string', 'ValueAsStringList': [ 'string', ] }, ], 'ExpiresAt': 'string' }, ], 'Errors': [ { 'FeatureGroupName': 'string', 'RecordIdentifierValueAsString': 'string', 'ErrorCode': 'string', 'ErrorMessage': 'string' }, ], 'UnprocessedIdentifiers': [ { 'FeatureGroupName': 'string', 'RecordIdentifiersValueAsString': [ 'string', ], 'FeatureNames': [ 'string', ] }, ] } **Response Structure** * *(dict) --* * **Records** *(list) --* A list of Records you requested to be retrieved in batch. * *(dict) --* The output of records that have been retrieved in a batch. * **FeatureGroupName** *(string) --* The "FeatureGroupName" containing Records you retrieved in a batch. * **RecordIdentifierValueAsString** *(string) --* The value of the record identifier in string format. * **Record** *(list) --* The "Record" retrieved. * *(dict) --* The value associated with a feature. * **FeatureName** *(string) --* 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 "CollectionType" is "None". Note that features types can be "String", "Integral", or "Fractional". 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 "CollectionType" is a "List", "Set", or "Vector". Note that features types can be "String", "Integral", or "Fractional". These values represents all three types as a string. * *(string) --* * **ExpiresAt** *(string) --* The "ExpiresAt" ISO string of the requested record. * **Errors** *(list) --* A list of errors that have occurred when retrieving a batch of Records. * *(dict) --* The error that has occurred when attempting to retrieve a batch of Records. * **FeatureGroupName** *(string) --* The name of the feature group that the record belongs to. * **RecordIdentifierValueAsString** *(string) --* The value for the "RecordIdentifier" in string format of a Record from a "FeatureGroup" that is causing an error when attempting to be retrieved. * **ErrorCode** *(string) --* The error code of an error that has occurred when attempting to retrieve a batch of Records. For more information on errors, see Errors. * **ErrorMessage** *(string) --* The error message of an error that has occurred when attempting to retrieve a record in the batch. * **UnprocessedIdentifiers** *(list) --* A unprocessed list of "FeatureGroup" names, with their corresponding "RecordIdentifier" value, and Feature name. * *(dict) --* The identifier that identifies the batch of Records you are retrieving in a batch. * **FeatureGroupName** *(string) --* The name or Amazon Resource Name (ARN) of the "FeatureGroup" containing the records you are retrieving in a batch. * **RecordIdentifiersValueAsString** *(list) --* The value for a list of record identifiers in string format. * *(string) --* * **FeatureNames** *(list) --* List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned. * *(string) --* **Exceptions** * "SageMakerFeatureStoreRuntime.Client.exceptions.ValidationError" * "SageMakerFeatureStoreRuntime.Client.exceptions.InternalFailure" * "SageMakerFeatureStoreRuntime.Client.exceptions.ServiceUnavailab le" * "SageMakerFeatureStoreRuntime.Client.exceptions.AccessForbidden" SageMakerFeatureStoreRuntime / Client / delete_record delete_record ************* SageMakerFeatureStoreRuntime.Client.delete_record(**kwargs) Deletes a "Record" from a "FeatureGroup" in the "OnlineStore". Feature Store supports both "SoftDelete" and "HardDelete". For "SoftDelete" (default), feature columns are set to "null" and the record is no longer retrievable by "GetRecord" or "BatchGetRecord". For "HardDelete", the complete "Record" is removed from the "OnlineStore". In both cases, Feature Store appends the deleted record marker to the "OfflineStore". The deleted record marker is a record with the same "RecordIdentifer" as the original, but with "is_deleted" value set to "True", "EventTime" set to the delete input "EventTime", and other feature values set to "null". Note that the "EventTime" specified in "DeleteRecord" should be set later than the "EventTime" of the existing record in the "OnlineStore" for that "RecordIdentifer". If it is not, the deletion does not occur: * For "SoftDelete", the existing (not deleted) record remains in the "OnlineStore", though the delete record marker is still written to the "OfflineStore". * "HardDelete" returns "EventTime": "400 ValidationException" to indicate that the delete operation failed. No delete record marker is written to the "OfflineStore". When a record is deleted from the "OnlineStore", the deleted record marker is appended to the "OfflineStore". If you have the Iceberg table format enabled for your "OfflineStore", you can remove all history of a record from the "OfflineStore" using Amazon Athena or Apache Spark. For information on how to hard delete a record from the "OfflineStore" with the Iceberg table format enabled, see Delete records from the offline store. See also: AWS API Documentation **Request Syntax** response = client.delete_record( FeatureGroupName='string', RecordIdentifierValueAsString='string', EventTime='string', TargetStores=[ 'OnlineStore'|'OfflineStore', ], DeletionMode='SoftDelete'|'HardDelete' ) Parameters: * **FeatureGroupName** (*string*) -- **[REQUIRED]** The name or Amazon Resource Name (ARN) of the feature group to delete the record from. * **RecordIdentifierValueAsString** (*string*) -- **[REQUIRED]** The value for the "RecordIdentifier" that uniquely identifies the record, in string format. * **EventTime** (*string*) -- **[REQUIRED]** Timestamp indicating when the deletion event occurred. "EventTime" can be used to query data at a certain point in time. * **TargetStores** (*list*) -- A list of stores from which you're deleting the record. By default, Feature Store deletes the record from all of the stores that you're using for the "FeatureGroup". * *(string) --* * **DeletionMode** (*string*) -- The name of the deletion mode for deleting the record. By default, the deletion mode is set to "SoftDelete". Returns: None **Exceptions** * "SageMakerFeatureStoreRuntime.Client.exceptions.ValidationError" * "SageMakerFeatureStoreRuntime.Client.exceptions.InternalFailure" * "SageMakerFeatureStoreRuntime.Client.exceptions.ServiceUnavailab le" * "SageMakerFeatureStoreRuntime.Client.exceptions.AccessForbidden" SageMakerFeatureStoreRuntime / Client / get_waiter get_waiter ********** SageMakerFeatureStoreRuntime.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" SageMakerFeatureStoreRuntime / Client / close close ***** SageMakerFeatureStoreRuntime.Client.close() Closes underlying endpoint connections. SageMakerFeatureStoreRuntime / Client / get_record get_record ********** SageMakerFeatureStoreRuntime.Client.get_record(**kwargs) Use for "OnlineStore" serving from a "FeatureStore". Only the latest records stored in the "OnlineStore" can be retrieved. If no Record with "RecordIdentifierValue" is found, then an empty result is returned. See also: AWS API Documentation **Request Syntax** response = client.get_record( FeatureGroupName='string', RecordIdentifierValueAsString='string', FeatureNames=[ 'string', ], ExpirationTimeResponse='Enabled'|'Disabled' ) Parameters: * **FeatureGroupName** (*string*) -- **[REQUIRED]** The name or Amazon Resource Name (ARN) of the feature group from which you want to retrieve a record. * **RecordIdentifierValueAsString** (*string*) -- **[REQUIRED]** The value that corresponds to "RecordIdentifier" type and uniquely identifies the record in the "FeatureGroup". * **FeatureNames** (*list*) -- List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned. * *(string) --* * **ExpirationTimeResponse** (*string*) -- Parameter to request "ExpiresAt" in response. If "Enabled", "GetRecord" will return the value of "ExpiresAt", if it is not null. If "Disabled" and null, "GetRecord" will return null. Return type: dict Returns: **Response Syntax** { 'Record': [ { 'FeatureName': 'string', 'ValueAsString': 'string', 'ValueAsStringList': [ 'string', ] }, ], 'ExpiresAt': 'string' } **Response Structure** * *(dict) --* * **Record** *(list) --* The record you requested. A list of "FeatureValues". * *(dict) --* The value associated with a feature. * **FeatureName** *(string) --* 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 "CollectionType" is "None". Note that features types can be "String", "Integral", or "Fractional". 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 "CollectionType" is a "List", "Set", or "Vector". Note that features types can be "String", "Integral", or "Fractional". These values represents all three types as a string. * *(string) --* * **ExpiresAt** *(string) --* The "ExpiresAt" ISO string of the requested record. **Exceptions** * "SageMakerFeatureStoreRuntime.Client.exceptions.ValidationError" * "SageMakerFeatureStoreRuntime.Client.exceptions.ResourceNotFound" * "SageMakerFeatureStoreRuntime.Client.exceptions.InternalFailure" * "SageMakerFeatureStoreRuntime.Client.exceptions.ServiceUnavailab le" * "SageMakerFeatureStoreRuntime.Client.exceptions.AccessForbidden"