Teradata Package for Python Function Reference on VantageCloud Lake - clone_filter - 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.11
Publication Date
August 2026
Content Type
Programming Reference
Publication ID
B700-4500-200K
ft:locale
en-US
ft:lastEdition
2026-08-13
ft:sourceId
FTML
dita:id
TeradataPython_FxRef_Lake_2000
Product Category
Teradata Vantage
teradataml.store.feature_store.models.FilterManager.clone_filter = clone_filter(self, source_filter_manager, filter_id_to_apply=1, clone_mode='soft')
DESCRIPTION:
    Clones filters from another FilterManager instance into the current FilterManager.
 
PARAMETERS:
    source_filter_manager:
        Required Argument.
        Specifies the source FilterManager to clone from.
        Types: FilterManager or str
 
    filter_id_to_apply:
        Optional Argument.
        Specifies which filter ID to set as active after cloning.
        Default Value: 1
        Note:
            * Must exist in the source FilterManager.
        Types: int
 
    clone_mode:
        Optional Argument.
        Specifies the cloning strategy.
        Default Value: 'soft'
        Permitted Values: 'soft', 'hard'
        Notes:
            * 'soft' — Links to the source filter manager's artifacts without
                       copying data (shared reference). 
            * 'hard' — Creates independent artifacts in the current filter manager
                       by copying data from the source (data duplication).
        Types: str
 
RETURNS:
    FilterManager object.
 
RAISES:
    TeradataMlException
 
EXAMPLES:
    >>> load_example_data('dataframe', 'admissions_train')
    >>> df = DataFrame("admissions_train")
 
    # Create a FeatureStore.
    >>> from teradataml import FeatureStore, FilterManager
    >>> fs = FeatureStore(repo='vfs_v1', data_domain='sales')
    Repo vfs_v1 does not exist. Run FeatureStore.setup() to create the repo and setup FeatureStore.
    >>> fs.setup()
 
    # Create a source FilterManager and load filter definitions.
    >>> fm = FilterManager(repo='vfs_v1', name='stats_filter_manager')
    Filter Manager 'stats_filter_manager' does not exist. Run FilterManager.load_filter() to create it.
    >>> fm.load_filter(df=df.groupby('stats').count()[['stats']])
    True
    >>> fm.list_filters()
                  stats
    filter_id          
    3            Novice
    2          Beginner
    1          Advanced
 
    >>> fm.get_current_filter()
          stats
    0  Advanced
 
    # Example 1: Create a new FilterManager and perform a soft clone of filters 
    #            from the source FilterManager.
    >>> fm2 = FilterManager(repo='vfs_v1', name='stats_filter_copy')
    >>> fm2.clone_filter(source_filter_manager=fm, clone_mode='soft')
    FilterManager(repo=vfs_v1, name=stats_filter_copy, filters=3)
 
    >>> fm2.list_filters()
                  stats
    filter_id          
    3            Novice
    2          Beginner
    1          Advanced
 
    >>> fm2.get_current_filter()
          stats
    0  Advanced
 
    # Example 2: Create a new FilterManager and perform a hard clone of filters
    #            from the source FilterManager and point to filter scenario with filter_id = 2
    #            after cloning.
    >>> fm3 = FilterManager(repo='vfs_v1', name='stats_filter_hard_copy')
    >>> fm3.clone_filter(source_filter_manager=fm, filter_id_to_apply=2, clone_mode='hard')
    FilterManager(repo=vfs_v1, name=stats_filter_hard_copy, filters=3)
 
    >>> fm3.list_filters()
                  stats
    filter_id          
    3            Novice
    2          Beginner
    1          Advanced
 
    >>> fm3.get_current_filter()
          stats
    0  Beginner