New-R1RecursiveSchemaRelationship

SYNOPSIS

Creates a relationship from a table to itself.

SYNTAX

New-R1RecursiveSchemaRelationship [-schemaName] <String> [-source] <String> [-foreignKeys] <String[]>
 [-depth] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Creates a recursive relationship, joining a table to itself on the foreign keys given. This is how hierarchies such as an employee reporting line are described.

EXAMPLES

Example 1

New-R1RecursiveSchemaRelationship -schemaName 'default' -source 'APP.EMPLOYEES' -foreignKeys 'MANAGERID' -depth 5

Joins the employees table to itself through the manager identifier, following five levels.

PARAMETERS

-schemaName

The name of the schema.

Type: String
Parameter Sets: (All)
Aliases: name

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-source

The table the relationship starts from.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-foreignKeys

The foreign keys the table joins to itself on.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-depth

The number of levels the relationship is followed through.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: 4
Default value: 0
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

CommonParameters

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

INPUTS

None

OUTPUTS

psRadiantOne.Relationship

NOTES

This command has not been exercised against a live deployment, so its behaviour rests on the published API definition alone.

New-R1SchemaRelationship

Get-R1SchemaRelationship