Class MigrationPlanBuilder
Default IMigrationPlanBuilder implementation.
Inheritance
Namespace: Tableau.Migration.Engine
Assembly: Tableau.Migration.dll
Syntax
public class MigrationPlanBuilder : IMigrationPlanBuilder, IMigrationPlanBuilder<IMigrationPlanBuilder>
Constructors
MigrationPlanBuilder(ISharedResourcesLocalizer, ILoggerFactory, ITableauApiSimulatorFactory, IMigrationServiceBuilderFactory, IMigrationPlanEndpointBuilder, IMigrationPlanEndpointBuilder, IMigrationPlanOptionsBuilder, IMigrationHookBuilder, IContentMappingBuilder, IContentFilterBuilder, IContentTransformerBuilder)
Creates a new MigrationPlanBuilder object.
Declaration
public MigrationPlanBuilder(ISharedResourcesLocalizer localizer, ILoggerFactory loggerFactory, ITableauApiSimulatorFactory simulatorFactory, IMigrationServiceBuilderFactory serviceBuilderFactory, IMigrationPlanEndpointBuilder source, IMigrationPlanEndpointBuilder destination, IMigrationPlanOptionsBuilder options, IMigrationHookBuilder hooks, IContentMappingBuilder mappings, IContentFilterBuilder filters, IContentTransformerBuilder transformers)
Parameters
| Type | Name | Description |
|---|---|---|
| ISharedResourcesLocalizer | localizer | The string localizer. |
| ILoggerFactory | loggerFactory | The logger factory. |
| ITableauApiSimulatorFactory | simulatorFactory | A simulator factory. |
| IMigrationServiceBuilderFactory | serviceBuilderFactory | The service builder factory. |
| IMigrationPlanEndpointBuilder | source | A new/fresh endpoint builder for the source endpoint. |
| IMigrationPlanEndpointBuilder | destination | A new/fresh endpoint builder for the destination endpoint. |
| IMigrationPlanOptionsBuilder | options | A new/fresh options builder. |
| IMigrationHookBuilder | hooks | A new/fresh hook builder. |
| IContentMappingBuilder | mappings | A new/fresh mapping builder. |
| IContentFilterBuilder | filters | A new/fresh filter builder. |
| IContentTransformerBuilder | transformers | A new/fresh transformer builder. |
Properties
Destination
Gets the destination endpoint builder.
Declaration
public IMigrationPlanEndpointBuilder Destination { get; }
Property Value
| Type | Description |
|---|---|
| IMigrationPlanEndpointBuilder |
Filters
Gets the filters to execute at various points during the migration.
Declaration
public IContentFilterBuilder Filters { get; }
Property Value
| Type | Description |
|---|---|
| IContentFilterBuilder |
Hooks
Gets the hooks to execute at various points during the migration, determined by hook type.
Declaration
public IMigrationHookBuilder Hooks { get; }
Property Value
| Type | Description |
|---|---|
| IMigrationHookBuilder |
Mappings
Gets the mappings to execute at various points during the migration.
Declaration
public IContentMappingBuilder Mappings { get; }
Property Value
| Type | Description |
|---|---|
| IContentMappingBuilder |
Options
Gets the per-plan options to supply.
Declaration
public IMigrationPlanOptionsBuilder Options { get; }
Property Value
| Type | Description |
|---|---|
| IMigrationPlanOptionsBuilder |
PipelineProfile
Gets the pipeline profile to execute.
Declaration
public PipelineProfile PipelineProfile { get; }
Property Value
| Type | Description |
|---|---|
| PipelineProfile |
Services
Gets the migration service overrides.
Declaration
public IMigrationServiceBuilder Services { get; }
Property Value
| Type | Description |
|---|---|
| IMigrationServiceBuilder |
Source
Gets the source endpoint builder.
Declaration
public IMigrationPlanEndpointBuilder Source { get; }
Property Value
| Type | Description |
|---|---|
| IMigrationPlanEndpointBuilder |
Transformers
Gets the transformations to execute at various points during the migration.
Declaration
public IContentTransformerBuilder Transformers { get; }
Property Value
| Type | Description |
|---|---|
| IContentTransformerBuilder |
Methods
AppendDefaultExtensions()
Adds default hooks, filters, etc. that are common between all migration scenarios.
Declaration
public IMigrationPlanBuilder AppendDefaultExtensions()
Returns
| Type | Description |
|---|---|
| IMigrationPlanBuilder | The same plan builder object for fluent API calls. |
Build()
Finalizes the IMigrationPlan based on the current state.
Declaration
public IMigrationPlan Build()
Returns
| Type | Description |
|---|---|
| IMigrationPlan | The created IMigrationPlan. |
ClearExtensions()
Clears all hooks, filters, mappings, and transformations.
Declaration
public IMigrationPlanBuilder ClearExtensions()
Returns
| Type | Description |
|---|---|
| IMigrationPlanBuilder | The same plan builder object for fluent API calls. |
ForCustomPipelineFactory(Func<IServiceProvider, IMigrationPipelineFactory>, params IEnumerable<MigrationPipelineContentType>)
Initializes the plan to perform a custom migration pipeline using the given pipeline factory.
Declaration
public IMigrationPlanBuilder ForCustomPipelineFactory(Func<IServiceProvider, IMigrationPipelineFactory> pipelineFactoryOverride, params IEnumerable<MigrationPipelineContentType> supportedContentTypes)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<IServiceProvider, IMigrationPipelineFactory> | pipelineFactoryOverride | An initializer function to build the pipeline factory. |
| IEnumerable<MigrationPipelineContentType> | supportedContentTypes | The supported content types of the custom pipeline. |
Returns
| Type | Description |
|---|---|
| IMigrationPlanBuilder | The same plan builder object for fluent API calls. |
ForCustomPipelineFactory<T>(params IEnumerable<MigrationPipelineContentType>)
Initializes the plan to perform a custom migration pipeline using the given pipeline factory.
Declaration
public IMigrationPlanBuilder ForCustomPipelineFactory<T>(params IEnumerable<MigrationPipelineContentType> supportedContentTypes) where T : IMigrationPipelineFactory
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<MigrationPipelineContentType> | supportedContentTypes | The supported content types of the custom pipeline. |
Returns
| Type | Description |
|---|---|
| IMigrationPlanBuilder | The same plan builder object for fluent API calls. |
Type Parameters
| Name | Description |
|---|---|
| T |
ForCustomPipeline<T>(params IEnumerable<MigrationPipelineContentType>)
Initializes the plan to perform a custom migration pipeline.
Declaration
public IMigrationPlanBuilder ForCustomPipeline<T>(params IEnumerable<MigrationPipelineContentType> supportedContentTypes) where T : IMigrationPipeline
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<MigrationPipelineContentType> | supportedContentTypes | The supported content types of the custom pipeline. |
Returns
| Type | Description |
|---|---|
| IMigrationPlanBuilder | The same plan builder object for fluent API calls. |
Type Parameters
| Name | Description |
|---|---|
| T |
ForServerToCloud()
Initializes the plan to perform a migration of content between a Tableau Server and Tableau Cloud site.
Declaration
public IServerToCloudMigrationPlanBuilder ForServerToCloud()
Returns
| Type | Description |
|---|---|
| IServerToCloudMigrationPlanBuilder | The same plan builder object for fluent API calls. |
FromSource(IMigrationPlanEndpointConfiguration)
Sets or overwrites the configuration for the source endpoint to migrate content from.
Declaration
public IMigrationPlanBuilder FromSource(IMigrationPlanEndpointConfiguration config)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationPlanEndpointConfiguration | config | The endpoint configuration. |
Returns
| Type | Description |
|---|---|
| IMigrationPlanBuilder | The same plan builder object for fluent API calls. |
FromSourceTableauServer(Uri, string, string, string, bool, string?)
Sets or overwrites the configuration for the source Tableau Server site to migrate content from.
Declaration
public IMigrationPlanBuilder FromSourceTableauServer(Uri serverUrl, string siteContentUrl, string accessTokenName, string accessToken, bool createApiSimulator = false, string? restApiVersion = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | serverUrl | The base URL of the Tableau Server to connect to. |
| string | siteContentUrl | The URL namespace of the site to connect to. Can be empty string for default site. |
| string | accessTokenName | The name of the personal access token to use to sign into the site. |
| string | accessToken | The personal access token to use to sign into the site. |
| bool | createApiSimulator | Whether or not to create an API simulator for the |
| string | restApiVersion | The REST API version to use, or null to use the default version. |
Returns
| Type | Description |
|---|---|
| IMigrationPlanBuilder | The same plan builder object for fluent API calls. |
SkipContentType(Type, bool)
Configures the migration plan to skip migration of all items of a particular content type.
Declaration
public IMigrationPlanBuilder SkipContentType(Type contentType, bool preCache = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | contentType | The content type to skip. |
| bool | preCache | True to find and map all source items so references in dependent content types can be efficiently updated. False to find and map items individually when they are referenced in dependent content types to avoid listing all items. |
Returns
| Type | Description |
|---|---|
| IMigrationPlanBuilder | The same plan builder object for fluent API calls. |
SkipContentType<TContent>(bool)
Configures the migration plan to skip migration of all items of a particular content type.
Declaration
public IMigrationPlanBuilder SkipContentType<TContent>(bool preCache = true)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | preCache | True to find and map all source items so references in dependent content types can be efficiently updated. False to find and map items individually when they are referenced in dependent content types to avoid listing all items. |
Returns
| Type | Description |
|---|---|
| IMigrationPlanBuilder | The same plan builder object for fluent API calls. |
Type Parameters
| Name | Description |
|---|---|
| TContent | The content type to skip. |
ToDestination(IMigrationPlanEndpointConfiguration)
Sets or overwrites the configuration for the destination endpoint to migrate content to.
Declaration
public IMigrationPlanBuilder ToDestination(IMigrationPlanEndpointConfiguration config)
Parameters
| Type | Name | Description |
|---|---|---|
| IMigrationPlanEndpointConfiguration | config | The endpoint configuration. |
Returns
| Type | Description |
|---|---|
| IMigrationPlanBuilder | The same plan builder object for fluent API calls. |
ToDestinationTableauCloud(Uri, string, string, string, bool, string?)
Sets or overwrites the configuration for the destination Tableau Cloud site to migrate content to.
Declaration
public IMigrationPlanBuilder ToDestinationTableauCloud(Uri podUrl, string siteContentUrl, string accessTokenName, string accessToken, bool createApiSimulator = false, string? restApiVersion = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | podUrl | The base URL of Tableau Cloud pod to connect to. |
| string | siteContentUrl | The URL namespace of the site to connect to. |
| string | accessTokenName | The name of the personal access token to use to sign into the site. |
| string | accessToken | The personal access token to use to sign into the site. |
| bool | createApiSimulator | Whether or not to create an API simulator for the |
| string | restApiVersion | The REST API version to use, or null to use the default version. |
Returns
| Type | Description |
|---|---|
| IMigrationPlanBuilder | The same plan builder object for fluent API calls. |
Validate()
Validates that the plan that would be built has enough information to execute.
Declaration
public IResult Validate()
Returns
| Type | Description |
|---|---|
| IResult | The validation result. |