Use the setup() function to set up all the required objects for the specified repository.
The function verifies the existence of a repository. If the repository does not exist, it will:
- Create the repository.
- Establish the necessary tables, views and triggers.
You must have CREATE privileges to create the database and the corresponding tables within it. See "Roles and Permissions" in Prerequisites to Using FeatureStore.
Optional Parameters
- perm_size
- Specifies the number of bytes to allocate to FeatureStore repo for permanent space.
Exponential notation can also be used.
Default value: 10e9.
- spool_size
- Specifies the number of bytes to allocate to FeatureStore repo for spool space.
Exponential notation can also be used.
Default value: 10e8.
Example setup
>>> from teradataml import FeatureStore
Example 1: Set up FeatureStore for repository 'vfs_v1'
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.
Set up FeatureStore for this repository.
>>> fs.setup()
True
>>> fs
VantageFeatureStore(vfs_v1)-v2.0.0
Example 2: Setup FeatureStore for repository 'vfs_v2' with custom perm_size and spool_size
Create FeatureStore for repo 'vfs_v2'.
>>> fs = FeatureStore("vfs_v2")
Repo vfs_v2 does not exist. Run FeatureStore.setup() to create the repo and setup FeatureStore.
Set up FeatureStore for this repository.
>>> fs.setup(perm_size='50e6', spool_size='50e6')
True
>>> fs
VantageFeatureStore(vfs_v2)-v2.0.0