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.11
Publication Date
August 2026
Content Type
Programming Reference
Publication ID
B700-4500-200K
ft:locale
en-US
ft:lastEdition
2026-08-13
ft:sourceId
FTML
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_feature_groups(archived=True)" 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
    # Create teradataml DataFrame.
    >>> load_example_data('dataframe', ['sales'])
    >>> df = DataFrame("sales")
 
    # Create FeatureStore for repo 'vfs_v1'.
    >>> fs = FeatureStore("vfs_v1", data_domain="d1")
    Repo vfs_v1 does not exist. Run FeatureStore.setup() to create the repo and setup FeatureStore.
    # Setup FeatureStore for this repository.
    >>> fs.setup()
    True
 
    # Example 1: Archive the FeatureGroup 'sales' in the repo 'vfs_v1' using FeatureGroup name.
    # Create FeatureGroup from teradataml DataFrame.
    >>> fg = FeatureGroup.from_DataFrame(name="sales", entity_columns="accounts", df=df, timestamp_column="datetime")
    # Apply FeatureGroup to FeatureStore.
    >>> fs.apply(fg)
    True
 
    # List all the available FeatureGroups.
    >>> fs.list_feature_groups()
                      description data_source_name entity_name               creation_time modified_time
    name  data_domain                                                                                   
    sales d1                 None            sales       sales  2025-07-28 05:00:19.780453          None
 
    # 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(archived=True)
        name data_domain description data_source_name entity_name               creation_time modified_time               archived_time
    0  sales          d1        None            sales       sales  2025-07-28 05:00:19.780453          None  2025-07-28 05:02:04.100000
 
    # Example 2: Archive the FeatureGroup 'sales' in the repo 'vfs_v1' using FeatureGroup object.
    # Create FeatureGroup from teradataml DataFrame.
    >>> fg2 = FeatureGroup.from_DataFrame(name="sales_df", entity_columns="accounts", df=df, timestamp_column="datetime")
    # Apply FeatureGroup to FeatureStore.
    >>> fs.apply(fg2)
    True
 
    # Archive FeatureGroup with FeatureGroup object.
    >>> fs.archive_feature_group(feature_group=fg2)
    FeatureGroup 'sales_df' is archived.
    True
 
    # List all the available FeatureGroups after archive.
    >>> fs.list_feature_groups(archived=True)
        name data_domain description data_source_name entity_name               creation_time modified_time               archived_time
    0  sales          d1        None            sales       sales  2025-07-28 05:00:19.780453          None  2025-07-28 05:02:04.100000
    1  sales_df       d1        None            sales       sales  2025-07-28 05:02:01.123456          None  2025-07-28 05:03:35.456789