Sample: Filter Custom Views by Shared Status
In this example, the custom views currently shared to all users are excluded from migration.
Filter Class
from tableau_migration import (
ICustomView,
ContentMigrationItem,
ContentFilterBase)
class SharedCustomViewFilter(ContentFilterBase[ICustomView]):
def should_migrate(self, item: ContentMigrationItem[ICustomView]) -> bool:
if item.source_item.shared == True:
return False
return True
Registration
plan_builder.filters.add(SharedCustomViewFilter)