Use the get_feature_process() method to retrieve the FeatureProcess based on the feature store's repo and data domain.
Required Parameter
- object
- Specifies the source to ingest feature values. It can be one of the following:
- teradataml DataFrame
- Feature group
- Process id
- If object is of type teradataml DataFrame, then entity and features should be provided.
- If object is of type str, then it is considered as process id of an existing FeatureProcess and reruns the process. Entity and features are taken from the existing feature process. Hence, entity and features are ignored.
- If object is of type FeatureGroup, then entity and features are taken from the FeatureGroup. Hence, entity and features are ignored.
Optional Parameters
- entity
- Specifies Entity for DataFrame.
- Ignored when object is of type FeatureGroup or str.
- If a string or list of strings is provided, then object should have these columns in it.
- If Entity object is provided, then associated columns in Entity object should be present in DataFrame.
- features
- Specifies list of features to be considered in feature process. Feature ingestion takes place only for these features.
Ignored when object is of type FeatureGroup or str.
- description
- Specifies description for the FeatureProcess.
Example setup
>>> from teradataml import FeatureStore
>>> 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: Get the FeatureProcess
Load the admissions data to the database.
>>> from teradataml import DataFrame, load_example_data
>>> load_example_data("dataframe", "admissions_train")
>>> admission_df = DataFrame("admissions_train")
Create a feature process.
>>> fp = FeatureProcess(repo='vfs_v1', ... data_domain='d1', ... object=admission_df, ... entity='id', ... features=['stats', 'programming', 'admitted']) >>> fp.run()
Process '0d365f08-66b0-11f0-88ff-b0dcef8381ea' started. Process '0d365f08-66b0-11f0-88ff-b0dcef8381ea' completed.
Get FeatureProcess from FeatureStore.
>>> fs.get_feature_process(object='0d365f08-66b0-11f0-88ff-b0dcef8381ea')
FeatureProcess(repo=vfs_v1, data_domain=d1, process_id=0d365f08-66b0-11f0-88ff-b0dcef8381ea)