list_data_sources() | FeatureStore List Method | Teradata Package for Python - list_data_sources() - 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 list_data_sources() method to list all the Data Sources.

Optional Argument

archived
Specifies whether to list effective data sources or archived data sources.

Default value: False

Example setup

>>> from teradataml import DataSource, FeatureStore, load_example_data

Create teradataml DataFrame.

>>> load_example_data("dataframe", "admissions_train")
>>> admissions = DataFrame("admissions_train")

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

Create DataSource using teradataml DataFrame.

>>> ds = DataSource(name='admissions', source=admissions)

Apply the DataSource to FeatureStore.

>>> fs.apply(ds)
True

Example 1: List all the effective DataSources in the repo 'vfs_v1'

>>> fs.list_data_sources()
                       description timestamp_column                            source               creation_time               modified_time
name       data_domain                                                                                                                      
admissions ALICE              None             None  select * from "admissions_train"  2025-07-28 03:26:53.507807                        None

Example 2: List all the archived DataSources in the repo 'vfs_v1'

Archive the DataSource.

>>> fs.archive_data_source('admissions')
DataSource 'admissions' is archived.
True

List archived DataSources.

>>> fs.list_data_sources(archived=True)
         name data_domain description timestamp_column                            source               creation_time modified_time               archived_time
0  admissions       ALICE        None             None  select * from "admissions_train"  2025-07-28 03:26:53.507807          None  2025-07-28 03:28:17.160000