Teradata Package for Python Function Reference on VantageCloud Lake - archive_data_source - 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.08
Published
November 2025
ft:locale
en-US
ft:lastEdition
2025-12-05
dita:id
TeradataPython_FxRef_Lake_2000
Product Category
Teradata Vantage
teradataml.store.feature_store.feature_store.FeatureStore.archive_data_source = archive_data_source(self, data_source)
DESCRIPTION:
    Archives DataSource from repository. Note that archived DataSource
    is not available for any further processing. Archived DataSource can be 
    viewed using "list_data_sources(archived=True)" method.
 
PARAMETERS:
    data_source:
        Required Argument.
        Specifies either the name of DataSource or Object of DataSource
        to archive from repository.
        Types: str OR DataSource
 
RETURNS:
    bool
 
RAISES:
    TeradataMLException, TypeError, ValueError
 
EXAMPLES:
    >>> 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