New-R1SchemaRelationship
New-R1SchemaRelationship
SYNOPSIS
Creates a relationship between two tables of a schema.
SYNTAX
New-R1SchemaRelationship [-schemaName] <String> [-source] <String> [-sourceAttrs] <String[]> [-dest] <String>
[-destAttrs] <String[]> [[-id] <String>] [[-tags] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Creates a relationship joining a source table to a destination table on the attributes given. The relationship as created is returned.
EXAMPLES
Example 1
New-R1SchemaRelationship -schemaName 'default' -source 'APP.CUSTOMERS' -sourceAttrs 'CUSTOMERID' -dest 'APP.ORDERS' -destAttrs 'CUSTOMERID'
Joins customers to orders on the customer identifier.
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
-sourceAttrs
The attributes of the source table the relationship joins on.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-dest
The table the relationship points at.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-destAttrs
The attributes of the destination table the relationship joins on.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-id
The identifier of the relationship. One is assigned when not supplied.
Type: String
Parameter Sets: (All)
Aliases: relationshipId
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-tags
Tags to record against the relationship.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
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.