Teradata Package for Python Function Reference on VantageCloud Lake - archive_feature_group - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference on VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Package for Python
Release Number
20.00.00.03
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-19
dita:id
TeradataPython_FxRef_Lake_2000
Product Category
Teradata Vantage
teradataml.store.feature_store.feature_store.FeatureStore.archive_feature_group = archive_feature_group(self, feature_group)
DESCRIPTION:
    Archives FeatureGroup from repository. Note that archived FeatureGroup
    is not available for any further processing. Archived FeatureGroup can be
    viewed using "list_archived_feature_groups()" method.
    Note:
        The function archives the associated Features, Entity and DataSource
        if they are not associated with any other FeatureGroups.
 
PARAMETERS:
    feature_group:
        Required Argument.
        Specifies either the name of FeatureGroup or Object of FeatureGroup
        to archive from repository.
        Types: str OR FeatureGroup
 
RETURNS:
    bool.
 
RAISES:
    TeradataMLException, TypeError, ValueError
 
EXAMPLES:
    >>> from teradataml import DataFrame, FeatureGroup, FeatureStore
    >>> load_example_data('dataframe', ['sales'])
    # Create teradataml DataFrame.
    >>> df = DataFrame("sales")
    # Create FeatureGroup from teradataml DataFrame.
    >>> fg = FeatureGroup.from_DataFrame(name="sales", entity_columns="accounts", df=df, timestamp_col_name="datetime")
    # Create FeatureStore for the repo 'staging_repo'.
    >>> fs = FeatureStore("staging_repo")
    # Apply FeatureGroup to FeatureStore.
    >>> fs.apply(fg)
    True
    # List all the available FeatureGroups.
    >>> fs.list_feature_groups()
          description data_source_name entity_name
    name
    sales        None            sales       sales
 
    # Archive FeatureGroup with name "sales".
    >>> fs.archive_feature_group(feature_group='sales')
    FeatureGroup 'sales' is archived.
    True
    >>>
    # List all the available FeatureGroups after archive.
    >>> fs.list_feature_groups()
    Empty DataFrame
    Columns: [description, data_source_name, entity_name]
    Index: []