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:

import boto3

client = boto3.client('sagemaker-featurestore-runtime')

These are the available methods:

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.
delete_record(**kwargs)

Deletes a Record from a FeatureGroup . A new record will show up in the OfflineStore when the DeleteRecord API is called. This record will have a value of True in the is_deleted column.

See also: AWS API Documentation

Request Syntax

response = client.delete_record(
    FeatureGroupName='string',
    RecordIdentifierValueAsString='string',
    EventTime='string'
)
Parameters
  • FeatureGroupName (string) --

    [REQUIRED]

    The name 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.

Returns

None

Exceptions

  • SageMakerFeatureStoreRuntime.Client.exceptions.ValidationError
  • SageMakerFeatureStoreRuntime.Client.exceptions.InternalFailure
  • SageMakerFeatureStoreRuntime.Client.exceptions.ServiceUnavailable
  • SageMakerFeatureStoreRuntime.Client.exceptions.AccessForbidden
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

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
L{botocore.paginate.Paginator}
Returns
A paginator object.
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',
    ]
)
Parameters
  • FeatureGroupName (string) --

    [REQUIRED]

    The name of the feature group in which you want to put the records.

  • 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) --
Return type

dict

Returns

Response Syntax

{
    'Record': [
        {
            'FeatureName': 'string',
            'ValueAsString': '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 associated with a feature, in string format. Note that features types can be String, Integral, or Fractional. This value represents all three types as a string.

Exceptions

  • SageMakerFeatureStoreRuntime.Client.exceptions.ValidationError
  • SageMakerFeatureStoreRuntime.Client.exceptions.ResourceNotFound
  • SageMakerFeatureStoreRuntime.Client.exceptions.InternalFailure
  • SageMakerFeatureStoreRuntime.Client.exceptions.ServiceUnavailable
  • SageMakerFeatureStoreRuntime.Client.exceptions.AccessForbidden
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
put_record(**kwargs)

Used for data ingestion into the FeatureStore . The PutRecord API writes to both the OnlineStore and OfflineStore . If the record is the latest record for the recordIdentifier , the record is written to both the OnlineStore and OfflineStore . If the record is a historic record, it is written only to the OfflineStore .

See also: AWS API Documentation

Request Syntax

response = client.put_record(
    FeatureGroupName='string',
    Record=[
        {
            'FeatureName': 'string',
            'ValueAsString': 'string'
        },
    ]
)
Parameters
  • FeatureGroupName (string) --

    [REQUIRED]

    The name 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) -- [REQUIRED]

        The value associated with a feature, in string format. Note that features types can be String, Integral, or Fractional. This value represents all three types as a string.

Returns

None

Exceptions

  • SageMakerFeatureStoreRuntime.Client.exceptions.ValidationError
  • SageMakerFeatureStoreRuntime.Client.exceptions.InternalFailure
  • SageMakerFeatureStoreRuntime.Client.exceptions.ServiceUnavailable
  • SageMakerFeatureStoreRuntime.Client.exceptions.AccessForbidden

Paginators

The available paginators are: