Amazon SageMaker Feature Store Runtime

2022/12/06 - Amazon SageMaker Feature Store Runtime - 2 updated api methods

Changes  For online + offline Feature Groups, added ability to target PutRecord and DeleteRecord actions to only online store, or only offline store. If target store parameter is not specified, actions will apply to both stores.

DeleteRecord (updated) Link ¶
Changes (request)
{'TargetStores': ['OnlineStore | OfflineStore']}

Deletes a Record from a FeatureGroup. When the DeleteRecord API is called a new record will be added to the OfflineStore and the Record will be removed from the OnlineStore. This record will have a value of True in the is_deleted column.

See also: AWS API Documentation

Request Syntax

client.delete_record(
    FeatureGroupName='string',
    RecordIdentifierValueAsString='string',
    EventTime='string',
    TargetStores=[
        'OnlineStore'|'OfflineStore',
    ]
)
type FeatureGroupName:

string

param FeatureGroupName:

[REQUIRED]

The name of the feature group to delete the record from.

type RecordIdentifierValueAsString:

string

param RecordIdentifierValueAsString:

[REQUIRED]

The value for the RecordIdentifier that uniquely identifies the record, in string format.

type EventTime:

string

param EventTime:

[REQUIRED]

Timestamp indicating when the deletion event occurred. EventTime can be used to query data at a certain point in time.

type TargetStores:

list

param TargetStores:

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) --

returns:

None

PutRecord (updated) Link ¶
Changes (request)
{'TargetStores': ['OnlineStore | OfflineStore']}

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

client.put_record(
    FeatureGroupName='string',
    Record=[
        {
            'FeatureName': 'string',
            'ValueAsString': 'string'
        },
    ],
    TargetStores=[
        'OnlineStore'|'OfflineStore',
    ]
)
type FeatureGroupName:

string

param FeatureGroupName:

[REQUIRED]

The name of the feature group that you want to insert the record into.

type Record:

list

param Record:

[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.

type TargetStores:

list

param TargetStores:

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) --

returns:

None