Use the archive_entity() method to archive an entity from the repository.
- An archived entity is not available for any further processing.
- An archived entity can be viewed using the list_entities(archived=True) method.
Required Parameter
- entity
- Specifies either the name of the entity or object of the entity to archive from the repository.
Example setup
>>> from teradataml import DataFrame, Entity, 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 Entity 'sales_data' in the repo 'vfs_v1' using Entity name
Create an entity using teradataml DataFrame Column.
>>> entity = Entity(name="sales_data", columns=df.accounts)
Apply the entity to FeatureStore.
>>> fs.apply(entity)
True
List all the available entities.
>>> fs.list_entities()
description creation_time modified_time entity_column name data_domain sales_data ALICE None 2025-07-28 04:54:34.687139 None accounts
Archive Entity with name "sales_data".
>>> fs.archive_entity(entity=entity.name)
Entity 'sales_data' is archived. True
List the entities after archive.
>>> fs.list_entities(archived=True)
name data_domain description creation_time modified_time archived_time entity_column 0 sales_data ALICE None 2025-07-28 04:54:34.687139 None 2025-07-28 04:55:46.750000 accounts
Example 2: Archive the Entity 'sales_data' in the repo 'vfs_v1' using Entity object
Create an entity using teradataml DataFrame Column.
>>> entity2 = Entity(name="sales_data_df", columns=df.accounts)
Apply the entity to FeatureStore.
>>> fs.apply(entity2)
True
Archive Entity with Entity object.
>>> fs.archive_entity(entity=entity2)
Entity 'sales_data_df' is archived. True
List the entities after archive.
>>> fs.list_entities(archived=True)
name data_domain description creation_time modified_time archived_time entity_column 0 sales_data ALICE None 2025-07-28 04:54:34.687139 None 2025-07-28 04:55:46.750000 accounts 1 sales_data_df ALICE None 2025-07-28 04:56:01.123456 None 2025-07-28 04:57:35.456789 accounts