Feature Store APIs

Feature group

class sagemaker.feature_store.feature_group.FeatureGroup(name: str = NOTHING, sagemaker_session: sagemaker.session.Session = <class 'sagemaker.session.Session'>, feature_definitions: Sequence[sagemaker.feature_store.feature_definition.FeatureDefinition] = NOTHING)

FeatureGroup definition.

This class instantiates a FeatureGroup object that comprises of a name for the FeatureGroup, session instance, and a list of feature definition objects i.e., FeatureDefinition.

name

name of the FeatureGroup instance.

Type

str

sagemaker_session

session instance to perform boto calls.

Type

Session

feature_definitions

list of FeatureDefinitions.

Type

Sequence[FeatureDefinition]

Method generated by attrs for class FeatureGroup.

class sagemaker.feature_store.feature_group.AthenaQuery(catalog: str, database: str, table_name: str, sagemaker_session: sagemaker.session.Session)

Class to manage querying of feature store data with AWS Athena.

This class instantiates a AthenaQuery object that is used to retrieve data from feature store via standard SQL queries.

catalog

name of the data catalog.

Type

str

database

name of the database.

Type

str

table_name

name of the table.

Type

str

sagemaker_session

instance of the Session class to perform boto calls.

Type

Session

Method generated by attrs for class AthenaQuery.

class sagemaker.feature_store.feature_group.IngestionManagerPandas(feature_group_name: str, sagemaker_session: sagemaker.session.Session, data_frame: pandas.core.frame.DataFrame, max_workers: int = 1)

Class to manage the multi-threaded data ingestion process.

This class will manage the data ingestion process which is multi-threaded.

feature_group_name

name of the Feature Group.

Type

str

sagemaker_session

instance of the Session class to perform boto calls.

Type

Session

data_frame

pandas DataFrame to be ingested to the given feature group.

Type

DataFrame

max_workers

number of threads to create.

Type

int

Method generated by attrs for class IngestionManagerPandas.

Feature definition

class sagemaker.feature_store.feature_definition.FeatureDefinition(feature_name: str, feature_type: sagemaker.feature_store.feature_definition.FeatureTypeEnum)

Feature definition.

This instantiates a Feature Definition object where FeatureDefinition is a subclass of Config.

feature_name

The name of the feature

Type

str

feature_type

The type of the feature

Type

FeatureTypeEnum

Method generated by attrs for class FeatureDefinition.

class sagemaker.feature_store.feature_definition.FractionalFeatureDefinition(feature_name: str)

Fractional feature definition.

This class instantiates a FractionalFeatureDefinition object, a subclass of FeatureDefinition where the data type of the feature being defined is a Fractional.

feature_name

The name of the feature

Type

str

feature_type

A FeatureTypeEnum.FRACTIONAL type

Type

FeatureTypeEnum

Construct an instance of FractionalFeatureDefinition.

Parameters

feature_name (str) – the name of the feature.

class sagemaker.feature_store.feature_definition.IntegralFeatureDefinition(feature_name: str)

Fractional feature definition.

This class instantiates a IntegralFeatureDefinition object, a subclass of FeatureDefinition where the data type of the feature being defined is a Integral.

feature_name

the name of the feature.

Type

str

feature_type

a FeatureTypeEnum.INTEGRAL type.

Type

FeatureTypeEnum

Construct an instance of IntegralFeatureDefinition.

Parameters

feature_name (str) – the name of the feature.

class sagemaker.feature_store.feature_definition.StringFeatureDefinition(feature_name: str)

Fractional feature definition.

This class instantiates a StringFeatureDefinition object, a subclass of FeatureDefinition where the data type of the feature being defined is a String.

feature_name

the name of the feature.

Type

str

feature_type

a FeatureTypeEnum.STRING type.

Type

FeatureTypeEnum

Construct an instance of StringFeatureDefinition.

Parameters

feature_name (str) – the name of the feature.

class sagemaker.feature_store.feature_definition.FeatureTypeEnum(value)

Enum of feature types.

The data type of a feature can be Fractional, Integral or String.

Inputs

class sagemaker.feature_store.inputs.Config

Base config object for FeatureStore.

Configs must implement the to_dict method.

class sagemaker.feature_store.inputs.DataCatalogConfig(table_name: str = NOTHING, catalog: str = NOTHING, database: str = NOTHING)

DataCatalogConfig for FeatureStore.

table_name

name of the table.

Type

str

catalog

name of the catalog.

Type

str

database

name of the database.

Type

str

Method generated by attrs for class DataCatalogConfig.

class sagemaker.feature_store.inputs.OfflineStoreConfig(s3_storage_config: sagemaker.feature_store.inputs.S3StorageConfig, disable_glue_table_creation: bool = False, data_catalog_config: sagemaker.feature_store.inputs.DataCatalogConfig = None)

OfflineStoreConfig for FeatureStore.

s3_storage_config

configuration of S3 storage.

Type

S3StorageConfig

disable_glue_table_creation

whether to disable the Glue table creation.

Type

bool

data_catalog_config

configuration of the data catalog.

Type

DataCatalogConfig

Method generated by attrs for class OfflineStoreConfig.

class sagemaker.feature_store.inputs.OnlineStoreConfig(enable_online_store: bool = True, online_store_security_config: sagemaker.feature_store.inputs.OnlineStoreSecurityConfig = None)

OnlineStoreConfig for FeatureStore.

enable_online_store

whether to enable the online store.

Type

bool

online_store_security_config

configuration of security setting.

Type

OnlineStoreSecurityConfig

Method generated by attrs for class OnlineStoreConfig.

class sagemaker.feature_store.inputs.OnlineStoreSecurityConfig(kms_key_id: str = NOTHING)

OnlineStoreSecurityConfig for FeatureStore.

kms_key_id

KMS key id.

Type

str

Method generated by attrs for class OnlineStoreSecurityConfig.

class sagemaker.feature_store.inputs.S3StorageConfig(s3_uri: str, kms_key_id: str = None)

S3StorageConfig for FeatureStore.

s3_uri

S3 URI.

Type

str

kms_key_id

KMS key id.

Type

str

Method generated by attrs for class S3StorageConfig.

class sagemaker.feature_store.inputs.FeatureValue(feature_name: str = None, value_as_string: str = None)

FeatureValue for FeatureStore.

feature_name

name of the Feature.

Type

str

value_as_string

value of the Feature in string form.

Type

str

Method generated by attrs for class FeatureValue.