Use the features property to get the list of feature objects in the feature catalog associated with the data domain.
Example setup
Load the data to be used and create the 'sales' DataFrame.
>>> from teradataml import load_example_data, DataFrame
>>> load_example_data('dataframe', ['sales', 'admissions_train'])
>>> admission_df = DataFrame("admissions_train")
>>> df = DataFrame('sales')
Define the repository and data domain.
>>> repo = 'vfs_test' >>> data_domain = 'sales'
Create a feature store.
>>> from teradataml import FeatureStore >>> fs = FeatureStore(repo=repo, data_domain=data_domain)
Repo vfs_test does not exist. Run FeatureStore.setup() to create the repo and setup FeatureStore.
Set up the feature store for this repository.
>>> fs.setup()
True
Run FeatureProcess to ingest features.
>>> from teradataml import FeatureProcess
>>> fp = FeatureProcess(repo=repo, ... data_domain=data_domain, ... object=df, ... entity='accounts', ... features=['Jan', 'Feb', 'Mar', 'Apr'])
>>> fp.run()
Process '4098c3ea-6c8d-11f0-837a-24eb16d15109' started. Process '4098c3ea-6c8d-11f0-837a-24eb16d15109' completed.
Run another FeatureProcess to ingest features into a different DataFrame.
Example: Get the features from the data domain
Create a data domain object.
>>> from teradataml import DataDomain >>> dd = DataDomain(repo=repo, ... data_domain=data_domain)
List the features.
>>> dd.features
[Feature(name=gpa), Feature(name=Jan), Feature(name=admitted), Feature(name=Apr), Feature(name=Feb), Feature(name=masters), Feature(name=Mar), Feature(name=stats)]