Sample: Filter Projects by Name
In this example, the project named Default
is filtered out.
Filter Class
from tableau_migration import (
IProject,
ContentMigrationItem,
ContentFilterBase)
class DefaultProjectFilter(ContentFilterBase[IProject]):
def should_migrate(self, item: ContentMigrationItem[IProject]) -> bool:
if item.source_item.name.casefold() == 'Default'.casefold():
return False
return True
Registration
plan_builder.filters.add(DefaultProjectFilter)
See hook registration for more details.