Tableau Migration SDK 5.1.1
  • Articles
  • Code Samples
  • Python API Reference
  • C# API Reference
Show / Hide Table of Contents
  • tableau_migration
    • migration
      • get_service
      • get_service_provider
      • PyMigrationResult
      • PyMigrationManifest
      • PyMigrationCompletionStatus
      • PyContentReference
      • PyContentLocation
      • PyPipelineProfile
      • PyResult
    • migration_api_rest
      • PyRestIdentifiable
    • migration_api_rest_models
      • PyAdministratorLevels
      • PyContentPermissions
      • PyLabelCategories
      • PyLicenseLevels
      • PyPermissionsCapabilityModes
      • PyPermissionsCapabilityNames
      • PySiteRoles
      • PyExtractEncryptionModes
    • migration_api_rest_models_types
      • PyAuthenticationTypes
      • PyDataSourceFileTypes
      • PyWorkbookFileTypes
    • migration_content
      • PyCloudSubscription
      • PySubscription
      • PySubscriptionContent
      • PyTag
      • PyUser
      • PyUserAuthenticationType
      • PyUsernameContent
      • PyServerSubscription
      • PyView
      • PyWithOwner
      • PyWithTags
      • PyWithWorkbook
      • PyWorkbook
      • PyWorkbookDetails
      • PyWithDomain
      • PyPublishedContent
      • PyPublishableGroup
      • PyConnection
      • PyConnectionsContent
      • PyContainerContent
      • PyCustomView
      • PyDataSource
      • PyDataSourceDetails
      • PyPublishableWorkbook
      • PyDescriptionContent
      • PyGroup
      • PyGroupUser
      • PyLabel
      • PyProject
      • PyPublishableCustomView
      • PyPublishableDataSource
      • PyExtractContent
    • migration_content_permissions
      • PyPermissions
      • PyGranteeType
      • PyGranteeCapability
      • PyCapability
    • migration_content_schedules
      • PyInterval
      • PyFrequencyDetails
      • PyExtractRefreshTask
      • PyExtractRefreshContentType
      • PySchedule
      • PyWithSchedule
    • migration_content_schedules_cloud
      • PyCloudSchedule
      • PyCloudExtractRefreshTask
    • migration_content_schedules_server
      • PyServerSchedule
      • PyServerExtractRefreshTask
    • migration_engine
      • PyServerToCloudMigrationPlanBuilder
      • PyMigrationPlanBuilder
      • PyMigrationPlan
      • PyContentMigrationItem
    • migration_engine_actions
      • PyMigrationActionResult
    • migration_engine_endpoints_search
      • PySourceContentReferenceFinder
      • PySourceContentReferenceFinderFactory
      • PyDestinationContentReferenceFinderFactory
      • PyDestinationContentReferenceFinder
    • migration_engine_hooks
      • PyMigrationHookBuilder
      • PyMigrationHookFactoryCollection
    • migration_engine_hooks_filters
      • PyContentFilterBuilder
    • migration_engine_hooks_filters_interop
      • PyContentFilterBase
    • migration_engine_hooks_interop
      • PyInitializeMigrationHookBase
      • PyMigrationActionCompletedHookBase
      • PyContentBatchMigrationCompletedHookBase
    • migration_engine_hooks_mappings
      • PyContentMappingContext
      • PyContentMappingBuilder
    • migration_engine_hooks_mappings_interop
      • PyContentMappingBase
      • PyTableauCloudUsernameMappingBase
    • migration_engine_hooks_postpublish
      • PyContentItemPostPublishContext
      • PyBulkPostPublishContext
    • migration_engine_hooks_postpublish_interop
      • PyContentItemPostPublishHookBase
      • PyBulkPostPublishHookBase
    • migration_engine_hooks_results
      • PyInitializeMigrationHookResult
    • migration_engine_hooks_transformers
      • PyContentTransformerBuilder
    • migration_engine_hooks_transformers_interop
      • PyXmlContentTransformerBase
      • PyContentTransformerBase
    • migration_engine_manifest
      • PyMigrationManifestEntryEditor
      • PyMigrationManifestEntryStatus
      • PyMigrationManifestSerializer
      • PyMigrationManifestEntry
    • migration_engine_migrators
      • PyContentItemMigrationResult
      • PyMigrator
    • migration_engine_migrators_batch
      • PyContentBatchMigrationResult
    • migration_engine_options
      • PyMigrationPlanOptionsBuilder
      • PyMigrationPlanOptionsCollection
    • migration_engine_pipelines
      • PyMigrationPipelineContentType
      • PyServerToCloudMigrationPipeline
    • migration_enum
    • migration_logger
      • MigrationLogger
    • migration_services
      • ScopedMigrationServices

PyContentLocation

class PyContentLocation(content_location)

Bases: object

Structure representing a logical location of a content item on a Tableau site. For example, for workbooks this represents the project path and the workbook name.

  • Parameters: content_location (ContentLocation)

__init__(content_location)

Creates a new PyContentLocation object.

Args: : content_location: A ContentLocation object.

Returns: None.

  • Parameters: content_location (ContentLocation)
  • Return type: None

Methods

__init__(content_location) Creates a new PyContentLocation object.
append(name) Creates a new ContentLocation with a new path segment appended.
for_username(domain, username) Creates a new ContentLocation value with the standard user/group name separator.
from_path(content_location_path, path_separator) Creates a new ContentLocation value from a string.
parent() Creates a new ContentLocation with the last path segment removed.
rename(new_name) Creates a new ContentLocation with the last path segment replaced.

Attributes

is_empty Gets whether this location reprents an empty path.
name Gets the non-pathed name of the location.
path Gets the full path of the location.
path_segments Gets the individual segments of the location path.
path_separator Gets the separator to use between segments in the location path.

property path_segments : Sequence[str]

Gets the individual segments of the location path.

property path_separator : str

Gets the separator to use between segments in the location path.

property path : str

Gets the full path of the location.

property name : str

Gets the non-pathed name of the location.

property is_empty : bool

Gets whether this location reprents an empty path.

classmethod for_username(domain, username)

Creates a new ContentLocation value with the standard user/group name separator.

Args: : domain: The user/group domain. username: The user/group name.

Returns: The newly created ContentLocation.

  • Parameters:
    • domain (str)
    • username (str)
  • Return type: Self

classmethod from_path(content_location_path, path_separator)

Creates a new ContentLocation value from a string.

Args: : content_location_path: The full path of the location. path_separator: The separator to use between segments in the location path.

Returns: The newly created ContentLocation.

  • Parameters:
    • content_location_path (str)
    • path_separator (str)
  • Return type: Self

append(name)

Creates a new ContentLocation with a new path segment appended.

Args: : name: The name to append to the path.

Returns: The new ContentLocation with the appended path.

  • Parameters: name (str)
  • Return type: Self

rename(new_name)

Creates a new ContentLocation with the last path segment replaced.

Args: : new_name: The new name to replace the last path segment with.

Returns: The renamed ContentLocation.

  • Parameters: new_name (str)
  • Return type: Self

parent()

Creates a new ContentLocation with the last path segment removed.

Returns: The new ContentLocation with the parent path.

  • Return type: Self
In this article