SageMaker / Client / update_feature_group

update_feature_group#

SageMaker.Client.update_feature_group(**kwargs)#

Updates the feature group by either adding features or updating the online store configuration. Use one of the following request parameters at a time while using the UpdateFeatureGroup API.

You can add features for your feature group using the FeatureAdditions request parameter. Features cannot be removed from a feature group.

You can update the online store configuration by using the OnlineStoreConfig request parameter. If a TtlDuration is specified, the default TtlDuration applies for all records added to the feature group after the feature group is updated. If a record level TtlDuration exists from using the PutRecord API, the record level TtlDuration applies to that record instead of the default TtlDuration.

See also: AWS API Documentation

Request Syntax

response = client.update_feature_group(
    FeatureGroupName='string',
    FeatureAdditions=[
        {
            'FeatureName': 'string',
            'FeatureType': 'Integral'|'Fractional'|'String'
        },
    ],
    OnlineStoreConfig={
        '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’re updating.

  • FeatureAdditions (list) –

    Updates the feature group. Updating a feature group is an asynchronous operation. When you get an HTTP 200 response, you’ve made a valid request. It takes some time after you’ve made a valid request for Feature Store to update the feature group.

    • (dict) –

      A list of features. You must include FeatureName and FeatureType. Valid feature FeatureType``s are ``Integral, Fractional and String.

      • FeatureName (string) –

        The name of a feature. The type must be a string. FeatureName cannot be any of the following: is_deleted, write_time, api_invocation_time.

      • FeatureType (string) –

        The value type of a feature. Valid values are Integral, Fractional, or String.

  • OnlineStoreConfig (dict) –

    Updates the feature group online store configuration.

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

        TtlDuration time unit.

      • Value (integer) –

        TtlDuration time value.

Return type:

dict

Returns:

Response Syntax

{
    'FeatureGroupArn': 'string'
}

Response Structure

  • (dict) –

    • FeatureGroupArn (string) –

      The Amazon Resource Number (ARN) of the feature group that you’re updating.

Exceptions

  • SageMaker.Client.exceptions.ResourceNotFound