archive_feature() | FeatureStore Archive Method | Teradata Package for Python - archive_feature() - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Package for Python
Release Number
20.00
Published
March 2025
ft:locale
en-US
ft:lastEdition
2025-12-05
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

Use the archive_feature() method to archive a feature from the repository.

  • An archived feature is not available for any further processing.
  • An archived feature can be viewed using the list_features(archived=True) method.

Required Parameter

feature
Specifies either the name of the feature or object of the feature to archive from the repository.

Example setup

>>> from teradataml import DataFrame, Feature, FeatureStore

Create teradataml DataFrame.

>>> load_example_data('dataframe', ['sales'])
>>> df = DataFrame("sales")

Create FeatureStore for repo 'vfs_v1'.

>>> fs = FeatureStore("vfs_v1")
Repo vfs_v1 does not exist. Run FeatureStore.setup() to create the repo and setup FeatureStore.

Set up FeatureStore for this repository.

>>> fs.setup()
True

Example 1: Archive the Feature 'sales_data_Feb' in the repo 'vfs_v1' using Feature object.

Create Feature for Column 'Feb'.

>>> feature = Feature(name="sales_data_Feb", column=df.Feb)

Apply the Feature to FeatureStore.

>>> fs.apply(feature)
True

List the available Features.

>>> fs.list_features()
                            id column_name description  tags data_type feature_type  status               creation_time modified_time group_name
name           data_domain                                                                                                                     
sales_data_Feb ALICE         1         Feb        None  None     FLOAT   CONTINUOUS  ACTIVE  2025-07-28 04:41:01.641026          None       None

Archive Feature with name "sales_data_Feb".

>>> fs.archive_feature(feature=feature)
Feature 'sales_data_Feb' is archived.
True

List the available archived Features.

>>> fs.list_features(archived=True)
   id            name data_domain column_name description  tags data_type feature_type  status               creation_time modified_time               archived_time group_name
0   1  sales_data_Feb       ALICE         Feb        None  None     FLOAT   CONTINUOUS  ACTIVE  2025-07-28 04:41:01.641026          None  2025-07-28 04:41:35.600000       None

Example 2: Archive the Feature 'sales_data_Jan' in the repo 'vfs_v1' using feature name

Create Feature for Column 'Jan'.

>>> feature2 = Feature(name="sales_data_Jan", column=df.Jan)

Apply the Feature to FeatureStore.

>>> fs.apply(feature2)
True

Archive Feature with name "sales_data_Jan".

>>> fs.archive_feature(feature="sales_data_Jan")
Feature 'sales_data_Jan' is archived.
True

List the available archived features.

>>> fs.list_features(archived=True)
 id            name data_domain column_name description  tags data_type feature_type  status               creation_time modified_time               archived_time group_name
0   1  sales_data_Feb       ALICE         Feb        None  None     FLOAT   CONTINUOUS  ACTIVE  2025-07-28 04:41:01.641026          None  2025-07-28 04:41:35.600000       None
1   2  sales_data_Jan       ALICE         Jan