Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Get-SCDWEntity

Updated: November 1, 2013

Applies To: System Center 2012 - Service Manager, System Center 2012 R2 Service Manager, System Center 2012 SP1 - Service Manager

Get-SCDWEntity

Gets the list of fact tables, dimensions, tables, and outriggers that exist in a data warehouse.

Syntax

Parameter Set: DatamartConnectionSet
Get-SCDWEntity [-ComputerName <String> ] [-Credential <PSCredential> ] [-DatamartComputerName <String> ] [-DatamartDatabaseName <String> ] [ <CommonParameters>]




Detailed Description

The Get-SCDWEntity cmdlet gets the list entity names and their types. Entities include act tables, dimensions, tables, and outriggers that exist in the data warehouse.

Entity names are required for setting watermarks, and for setting and getting retention periods; by using the Set-SCDWWatermark, Set-SCDWRetentionPeriod, and Get-SCDWRetentionPeriod cmdlets.

Parameters

-ComputerName<String>

Specifies the name of the computer on which the System Center Data Access service is running. The user account that is defined in the Credential parameter must have access rights to the specified computer. You can omit this parameter only if the System Center Data Access Service is running on the same computer that has Service Manager installed.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies the credentials to use when you are connecting to the server on which the System Center Data Access service is running. The user account that is provided must have access to that server.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DatamartComputerName<String>

Specifies the name of the computer on which the datamart resides. Typically, this is the Structured Query Language (SQL) database server that the data warehouse uses. If no value is provided, Service Manager inspects the configuration of the data warehouse and discovers the value.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DatamartDatabaseName<String>

Specifies the name of the database of the datamart. Typically, this is the SQL database server that the data warehouse uses. The default value is the data warehouse repository. Entity values can be retrieved from the Staging or from the DataMart databases.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None.

    You cannot pipe input to this cmdlet.


Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.EnterpriseManagement.Warehouse.Cmdlets.GetSCDWEntity

    A collection of Microsoft.EnterpriseManagement.Warehouse.Cmdlets.GetSCDWEntity objects.


Examples

-------------------------- EXAMPLE 1 --------------------------

This command displays the EntityName values and their EntityType, and displays the output in pages.


PS C:\> Get-SCDWEntity -ComputerName serverDW7 | Format-Table -AutoSize | Out-Host -Paging

-------------------------- EXAMPLE 2 --------------------------

The first command stores user credentials for the Credential parameter.

The second command displays the entity data using the specified credentials.


PS C:\> $credUser = Get-Credential
PS C:\> Get-SCDWEntity -ComputerName serverDW7 –Credential $credUser| Format-Table -AutoSize | Out-Host -Paging

-------------------------- EXAMPLE 3 --------------------------

This command displays the EntityName values sorted by their EntityType.


PS C:\> Get-SCDWEntity -ComputerName serverDW7 | Sort-Object -Property EntityType, EntityName | Format-Table –AutoSize | Out-Host -Paging

-------------------------- EXAMPLE 4 --------------------------

This command displays the EntityName values whose EntityType value is 'Fact'.


PS C:\> Get-SCDWEntity -ComputerName serverDW7 | Where-Object {$_.EntityType -eq "Fact"} | Sort-Object -Property EntityType, EntityName | Format-Table -AutoSize

-------------------------- EXAMPLE 5 --------------------------

This command displays the entities in the OMDWDatamart database.


PS C:\> Get-SCDWEntity -ComputerName serverDW7 -DatamartComputerName serverDW7 -DatamartDatabaseName OMDWDatamart | Format-Table -AutoSize | Out-Host -Paging

-------------------------- EXAMPLE 6 --------------------------

This example, and the example that follows, show how to use hash tables to investigate the entity data. This example shows how to create hash tables of the entities according to their database and then how to derive hash tables from them to obtain specific data.

The first, third, and fifth command create hash tables.

The second, fourth, and sixth commands populate the hash tables with the entity names and types in the DWDatamart, OMDWDatamart, and CMDWDatamart databases. The key is the entity name, and the value is the entity type.


PS C:\> $DWDatamart = @{}
PS C:\> Get-SCDWEntity -ComputerName serverDW7 -DatamartComputerName serverDW7 -DatamartDatabaseName DWDatamart | ForEach-Object {$DWDatamart.Add($_.EntityName, $_.EntityType)}
PS C:\> $OMDWDatamart = @{}
PS C:\> Get-SCDWEntity -ComputerName serverDW7 -DatamartComputerName serverDW7 -DatamartDatabaseName OMDWDatamart | ForEach-Object {$OMDWDatamart.Add($_.EntityName, $_.EntityType)}
PS C:\> $CMDWDatamart = @{}
PS C:\> Get-SCDWEntity -ComputerName serverDW7 -DatamartComputerName serverDW7 -DatamartDatabaseName CMDWDatamart | ForEach-Object {$CMDWDatamart.Add($_.EntityName, $_.EntityType)}

-------------------------- EXAMPLE 7 --------------------------

This example assumes you still have the $DWDatamart hash table created in the previous example.

The first command creates a hash table named $DWDatamart_Outrigger.

The second command populates the $DWDatamart_Outrigger hash table with the Outrigger entities in the DWDatamart database.


PS C:\> $DWDatamart_Outrigger = @()
PS C:\> foreach ($key in $DWDatamart.Keys) {
>>    if ($DWDatamart[$key] -eq "Outrigger") {
>>    $DWDatamart_Outrigger.Add($key,$DWDatamart[$key])
>>    }
>>}

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.