Skip to main content

feature_groups

Creates, updates, deletes, gets or lists a feature_groups resource.

Overview

Namefeature_groups
TypeResource
Idaws.sagemaker.feature_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)A timestamp indicating when SageMaker created the FeatureGroup.
descriptionstringA free form description of the feature group.
event_time_feature_namestringThe name of the feature that stores the EventTime of a Record in a FeatureGroup. An EventTime is a point in time when a new event occurs that corresponds to the creation or update of a Record in a FeatureGroup. All Records in the FeatureGroup have a corresponding EventTime. (pattern: <code>[a-zA-Z0-9]([-_]*[a-zA-Z0-9]){0,63}</code>)
failure_reasonstringThe reason that the FeatureGroup failed to be replicated in the OfflineStore. This is failure can occur because: The FeatureGroup could not be created in the OfflineStore. The FeatureGroup could not be deleted from the OfflineStore.
feature_definitionsarrayA list of the Features in the FeatureGroup. Each feature is defined by a FeatureName and FeatureType.
feature_group_arnstringThe Amazon Resource Name (ARN) of the FeatureGroup. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:feature-group/.*</code>)
feature_group_namestringhe name of the FeatureGroup. (pattern: <code>[a-zA-Z0-9]([_-]*[a-zA-Z0-9]){0,63}</code>)
feature_group_statusstringThe status of the feature group. (Creating, Created, CreateFailed, Deleting, DeleteFailed)
last_modified_timestring (date-time)A timestamp indicating when the feature group was last updated.
last_update_statusobjectA value indicating whether the update made to the feature group was successful.
next_tokenstringA token to resume pagination of the list of Features (FeatureDefinitions). (pattern: <code>.*</code>)
offline_store_configobjectThe configuration of the offline store. It includes the following configurations: Amazon S3 location of the offline store. Configuration of the Glue data catalog. Table format of the offline store. Option to disable the automatic creation of a Glue table for the offline store. Encryption configuration.
offline_store_statusobjectThe status of the OfflineStore. Notifies you if replicating data into the OfflineStore has failed. Returns either: Active or Blocked
online_store_configobjectThe configuration for the OnlineStore.
online_store_total_size_bytesinteger (int64)The size of the OnlineStore in bytes.
record_identifier_feature_namestringThe name of the Feature used for RecordIdentifier, whose value uniquely identifies a record stored in the feature store. (pattern: <code>[a-zA-Z0-9]([-_]*[a-zA-Z0-9]){0,63}</code>)
role_arnstringThe Amazon Resource Name (ARN) of the IAM execution role used to persist data into the OfflineStore if an OfflineStoreConfig is provided. (pattern: <code>arn:aws[a-z-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>)
throughput_configobjectActive throughput configuration of the feature group. There are two modes: ON_DEMAND and PROVISIONED. With on-demand mode, you are charged for data reads and writes that your application performs on your feature group. You do not need to specify read and write throughput because Feature Store accommodates your workloads as they ramp up and down. You can switch a feature group to on-demand only once in a 24 hour period. With provisioned throughput mode, you specify the read and write capacity per second that you expect your application to require, and you are billed based on those limits. Exceeding provisioned throughput will result in your requests being throttled. Note: PROVISIONED throughput mode is supported only for feature groups that are offline-only, or use the Standard tier online store.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_feature_groupselectregionUse this operation to describe a FeatureGroup. The response includes information on the creation time, FeatureGroup name, the unique identifier for each FeatureGroup, and more.
list_feature_groupsselectregionList FeatureGroups based on given filter and order.
create_feature_groupinsertregion, FeatureGroupName, RecordIdentifierFeatureName, EventTimeFeatureName, FeatureDefinitionsCreate a new FeatureGroup. A FeatureGroup is a group of Features defined in the FeatureStore to describe a Record. The FeatureGroup defines the schema and features contained in the FeatureGroup. A FeatureGroup definition is composed of a list of Features, a RecordIdentifierFeatureName, an EventTimeFeatureName and configurations for its OnlineStore and OfflineStore. Check Amazon Web Services service quotas to see the FeatureGroups quota for your Amazon Web Services account. Note that it can take approximately 10-15 minutes to provision an OnlineStore FeatureGroup with the InMemory StorageType. You must include at least one of OnlineStoreConfig and OfflineStoreConfig to create a FeatureGroup.
update_feature_groupupdateregion, FeatureGroupNameUpdates 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. To remove the default TtlDuration from an existing feature group, use the UpdateFeatureGroup API and set the TtlDuration Unit and Value to null.
delete_feature_groupdeleteregionDelete the FeatureGroup and any data that was written to the OnlineStore of the FeatureGroup. Data cannot be accessed from the OnlineStore immediately after DeleteFeatureGroup is called. Data written into the OfflineStore will not be deleted. The Amazon Web Services Glue database and tables that are automatically created for your OfflineStore are not deleted. Note that it can take approximately 10-15 minutes to delete an OnlineStore FeatureGroup with the InMemory StorageType.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Use this operation to describe a FeatureGroup. The response includes information on the creation time, FeatureGroup name, the unique identifier for each FeatureGroup, and more.

SELECT
creation_time,
description,
event_time_feature_name,
failure_reason,
feature_definitions,
feature_group_arn,
feature_group_name,
feature_group_status,
last_modified_time,
last_update_status,
next_token,
offline_store_config,
offline_store_status,
online_store_config,
online_store_total_size_bytes,
record_identifier_feature_name,
role_arn,
throughput_config
FROM aws.sagemaker.feature_groups
WHERE region = '{{ region }}' -- required
;

INSERT examples

Create a new FeatureGroup. A FeatureGroup is a group of Features defined in the FeatureStore to describe a Record. The FeatureGroup defines the schema and features contained in the FeatureGroup. A FeatureGroup definition is composed of a list of Features, a RecordIdentifierFeatureName, an EventTimeFeatureName and configurations for its OnlineStore and OfflineStore. Check Amazon Web Services service quotas to see the FeatureGroups quota for your Amazon Web Services account. Note that it can take approximately 10-15 minutes to provision an OnlineStore FeatureGroup with the InMemory StorageType. You must include at least one of OnlineStoreConfig and OfflineStoreConfig to create a FeatureGroup.

INSERT INTO aws.sagemaker.feature_groups (
FeatureGroupName,
RecordIdentifierFeatureName,
EventTimeFeatureName,
FeatureDefinitions,
OnlineStoreConfig,
OfflineStoreConfig,
ThroughputConfig,
RoleArn,
Description,
Tags,
region
)
SELECT
'{{ FeatureGroupName }}' /* required */,
'{{ RecordIdentifierFeatureName }}' /* required */,
'{{ EventTimeFeatureName }}' /* required */,
'{{ FeatureDefinitions }}' /* required */,
'{{ OnlineStoreConfig }}',
'{{ OfflineStoreConfig }}',
'{{ ThroughputConfig }}',
'{{ RoleArn }}',
'{{ Description }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
feature_group_arn
;

UPDATE examples

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. To remove the default TtlDuration from an existing feature group, use the UpdateFeatureGroup API and set the TtlDuration Unit and Value to null.

UPDATE aws.sagemaker.feature_groups
SET
FeatureGroupName = '{{ FeatureGroupName }}',
FeatureAdditions = '{{ FeatureAdditions }}',
OnlineStoreConfig = '{{ OnlineStoreConfig }}',
ThroughputConfig = '{{ ThroughputConfig }}'
WHERE
region = '{{ region }}' --required
AND FeatureGroupName = '{{ FeatureGroupName }}' --required
RETURNING
feature_group_arn;

DELETE examples

Delete the FeatureGroup and any data that was written to the OnlineStore of the FeatureGroup. Data cannot be accessed from the OnlineStore immediately after DeleteFeatureGroup is called. Data written into the OfflineStore will not be deleted. The Amazon Web Services Glue database and tables that are automatically created for your OfflineStore are not deleted. Note that it can take approximately 10-15 minutes to delete an OnlineStore FeatureGroup with the InMemory StorageType.

DELETE FROM aws.sagemaker.feature_groups
WHERE region = '{{ region }}' --required
;