Share via


Merge-Partition

This cmdlet merges the data of one or more source partitions into a target partition and deletes the source partitions.

Syntax

ParameterSetName (Default)

Merge-Partition
    [-Name] <String>
    -SourcePartitions <String[]>
    -Database <String>
    -Cube <String>
    -MeasureGroup <String>
    [-Server <String>]
    [-Credential <PSCredential>]
    [-ServicePrincipal]
    [-ApplicationId <String>]
    [-TenantId <String>]
    [-CertificateThumbprint <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ParameterSetInputObject

Merge-Partition
    -SourcePartitions <String[]>
    -Database <String>
    -Cube <String>
    -MeasureGroup <String>
    -TargetPartition <Partition>
    [-Server <String>]
    [-Credential <PSCredential>]
    [-ServicePrincipal]
    [-ApplicationId <String>]
    [-TenantId <String>]
    [-CertificateThumbprint <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ParameterSetTabularName

Merge-Partition
    [-Server <String>]
    [-Credential <PSCredential>]
    [-ServicePrincipal]
    [-ApplicationId <String>]
    [-TenantId <String>]
    [-CertificateThumbprint <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ParameterSetTabularInputObject

Merge-Partition
    [-Server <String>]
    [-Credential <PSCredential>]
    [-ServicePrincipal]
    [-ApplicationId <String>]
    [-TenantId <String>]
    [-CertificateThumbprint <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

This cmdlet merges the data of one or more source partitions into a target partition and deletes the source partitions.

Partitions can be merged only if they meet all the following criteria:

  • Partitions are in the same measure group.
  • Partitions are stored in the same mode (MOLAP, HOLAP, and ROLAP).

Module requirements: version 21+ on PowerShell 5.1; version 21 (recent preview) or version 22+ on PowerShell 7.x.

Examples

Merge partitions

$sources = "customers_2006","customers_2007","customers_2008"
PS C:\> Merge-Partition -Name:Customers_2005 -SourcePartitions:$sources -Database:"AdventureWorksDW" -Cube:"Adventure Works" -MeasureGroup:"Internet Customers"

Parameters

-ApplicationId

The application Id for the service principal.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CertificateThumbprint

The certificate thumbprint for the service principal.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Credential

If this parameter is specified, the user name and password passed will be used to connect to specified Analysis Server instance. If no credentials are specified default windows account of the user who is running the tool will be used.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Cube

Name of the cube under which the partitions exist.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetInputObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Database

Name of the Analysis Server database where the partitions exist.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetInputObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MeasureGroup

Name of the Measure Group under which the partitions exist.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetInputObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Name of the target partition to where the source partitions data will be merged.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Server

Optionally specifies the server instance to connect to if not currently in the SQLAS Provider directory.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServicePrincipal

Specifies that this connection is using service principal.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SourcePartitions

Source partition names from which data is merged to target partition.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ParameterSetInputObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TargetPartition

Specifies the target partition to which the source partitions will be merged.

Parameter properties

Type:Partition
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ParameterSetInputObject
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-TenantId

The tenant Id for the service principal.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.AnalysisServices.Partition