archive_data_source() | FeatureStore Archive Method | Teradata Package for Python - archive_data_source() - 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_data_source() method to archive a data source from the repository.

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

Required Parameter

data_source
Specifies either the name of the data source or object of the datasource to archive from the repository.

Example setup

>>> from teradataml import DataFrame, DataSource, FeatureStore

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.

Setup FeatureStore for this repository.

>>> fs.setup()
True

Example 1: Archive the DataSource 'sales_data' in the repo 'vfs_v1' using DataSource object

Create a DataSource using SELECT statement.

>>> ds = DataSource(name="sales_data", source="select * from sales")

Apply DataSource to FeatureStore.

>>> fs.apply(ds)
True

List the available DataSources.

>>> fs.list_data_sources()
                       description timestamp_column               source               creation_time modified_time
name       data_domain                                                                                           
sales_data ALICE              None             None  select * from sales  2025-07-28 04:24:48.117827          None

Archive DataSource with name "sales_data".

>>> fs.archive_data_source("sales_data")
DataSource 'sales_data' is archived.
True

List the available DataSources after archive.

>>> fs.list_data_sources(archived=True)
         name data_domain description timestamp_column               source               creation_time modified_time               archived_time
0  sales_data       ALICE        None             None  select * from sales  2025-07-28 04:24:48.117827          None  2025-07-28 04:25:55.430000

Example 2: Archive the DataSource 'sales_data' in the repo 'vfs_v1' using DataSource name

Create a DataSource using teradataml DataFrame.

>>> from teradataml import DataFrame
>>> load_example_data('dataframe', ['sales'])
>>> df = DataFrame("sales")
>>> ds2 = DataSource(name="sales_data_df", source=df)

Apply DataSource to FeatureStore.

>>> fs.apply(ds2)
True

Archive DataSource with name "sales_data_df".

>>> fs.archive_data_source("sales_data_df")
DataSource 'sales_data_df' is archived.
True

List the available DataSources after archive.

>>> fs.list_data_sources(archived=True)
name data_domain description timestamp_column               source               creation_time modified_time               archived_time
0  sales_data       ALICE        None             None  select * from sales  2025-07-28 04:24:48.117827          None  2025-07-28 04:25:55.430000
1  sales_data_df    ALICE        None             None  select * from sales  2025-07-28 04:26:10.123456          None  2025-07-28 04:26:45.456789