Sdílet prostřednictvím


Merge-Partition

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

Syntax

Merge-Partition
     [-Name] <String>
     -SourcePartitions <String[]>
     -Database <String>
     -Cube <String>
     -MeasureGroup <String>
     [-Server <String>]
     [-Credential <PSCredential>]
     [-ServicePrincipal]
     [-ApplicationId <String>]
     [-TenantId <String>]
     [-CertificateThumbprint <String>]
     [-ProgressAction <ActionPreference>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Merge-Partition
     -SourcePartitions <String[]>
     -Database <String>
     -Cube <String>
     -MeasureGroup <String>
     -TargetPartition <Partition>
     [-Server <String>]
     [-Credential <PSCredential>]
     [-ServicePrincipal]
     [-ApplicationId <String>]
     [-TenantId <String>]
     [-CertificateThumbprint <String>]
     [-ProgressAction <ActionPreference>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Merge-Partition
     [-Server <String>]
     [-Credential <PSCredential>]
     [-ServicePrincipal]
     [-ApplicationId <String>]
     [-TenantId <String>]
     [-CertificateThumbprint <String>]
     [-ProgressAction <ActionPreference>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Merge-Partition
     [-Server <String>]
     [-Credential <PSCredential>]
     [-ServicePrincipal]
     [-ApplicationId <String>]
     [-TenantId <String>]
     [-CertificateThumbprint <String>]
     [-ProgressAction <ActionPreference>]
     [-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.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CertificateThumbprint

The certificate thumbprint for the service principal.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Cube

Name of the cube under which the partitions exist.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Database

Name of the Analysis Server database where the partitions exist.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MeasureGroup

Name of the Measure Group under which the partitions exist.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

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

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ProgressAction

Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. The Write-Progress cmdlet creates progress bars that show a command's status.

Type:ActionPreference
Aliases:proga
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Server

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ServicePrincipal

Specifies that this connection is using service principal.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SourcePartitions

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

Type:String[]
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-TargetPartition

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

Type:Partition
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-TenantId

The tenant Id for the service principal.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.AnalysisServices.Partition

Notes

Not supported on tabular databases with compatibility level 1200 or higher.