Skip to content

Commit

Permalink
[Synapse] Updated help doc for [Set-AzSynapseLinkConnection] and [Set…
Browse files Browse the repository at this point in the history
…-AzSynapseLinkConnectionLinkTable] (Azure#19144)

* update help doc for set link connection cmdlets

* remove escaped back slash
  • Loading branch information
yanjungao718 authored Aug 16, 2022
1 parent af94f6c commit 8616829
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 5 deletions.
35 changes: 33 additions & 2 deletions src/Synapse/Synapse/help/Set-AzSynapseLinkConnection.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,46 @@ The **Set-AzSynapseLinkConnection** cmdlet creates or updates a link connections

### Example 1
```powershell
Set-AzSynapseLinkConnection -WorkspaceName ContosoWorkspace -DefinitionFile "C:\\samples\\linkconnection.json"
<#
linkconnection.json
{
"name":"sampleLinkConnection", // please change to your link connection name
"properties":{
"sourceDatabase":{
"typeProperties":{ // please change to your source database resourceId and principalId
"resourceId":"/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/sampleResourceGroup/providers/Microsoft.Sql/servers/sampleServer",
"principalId":"xxxxxxxxxx"
},
"linkedService":{
"referenceName":"sampleLinkServiceReference", // please change to your source database link service name
"type":"LinkedServiceReference"
}
},
"targetDatabase":{
"linkedService":{
"referenceName":"sampleLinkServiceReference", // please change to your target database link service name
"type":"LinkedServiceReference",
"parameters":{
"DBName":"v2"
}
}
},
"compute":{
"coreCount":16,
"computeType":"General"
}
}
}
#>
Set-AzSynapseLinkConnection -WorkspaceName ContosoWorkspace -DefinitionFile "C:\samples\linkconnection.json"
```

This command creates or updates a link connection from definition file linkconnection.json in the workspace named ContosoWorkspace.

### Example 2
```powershell
$ws = Get-AzSynapseWorkspace -Name ContosoWorkspace
$ws | Set-AzSynapseLinkConnection -DefinitionFile "C:\\samples\\linkconnection.json"
$ws | Set-AzSynapseLinkConnection -DefinitionFile "C:\samples\linkconnection.json"
```

This command creates or updates a link connection from definition file linkconnection.json in the workspace named ContosoWorkspace through pipeline.
Expand Down
29 changes: 26 additions & 3 deletions src/Synapse/Synapse/help/Set-AzSynapseLinkConnectionLinkTable.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,30 @@ The **Set-AzSynapseLinkConnectionLinkTables** cmdlet edits link tables under a l

### Example 1
```powershell
Set-AzSynapseLinkConnectionLinkTable -WorkspaceName ContosoWorkspace -LinkConnectionName ContosoLinkConnection -EditTablesRequestFile "C:\\samples\\edittables.json"
<#
edittables.json
{
"linkTables": [
{
"id": "00000000000000000000000000000000", // please change to your link table Id: a uuid
"source": {
"tableName": "sampleSourceTable", // please change to your source table name
"schemaName": "sampleSourceSchema" // please change to your source database schema name
},
"target": {
"tableName": "sampleTargetTable", // please change to your target table name
"schemaName": "sampleTargetSchema", // please change to your target database schema name
"distributionOptions": {
"type": "Round_RoBin", // please choose a type from Hash, Round_RoBin, Replicate
"distributionColumn": "sampleColumn" // please change to the column name
}
},
"operationType": "add" // please choose a value from add, update, remove
}
]
}
#>
Set-AzSynapseLinkConnectionLinkTable -WorkspaceName ContosoWorkspace -LinkConnectionName ContosoLinkConnection -EditTablesRequestFile "C:\samples\edittables.json"
```

This command edits link tables under link connection ContosoLinkConnection in workspace ContosoWorkspace.
Expand All @@ -49,7 +72,7 @@ This file includes information about edited link table.
### Example 2
```powershell
$ws = Get-AzSynapseWorkspace -Name ContosoWorkspace
$ws | Set-AzSynapseLinkConnectionLinkTable -LinkConnectionName ContosoLinkConnection -EditTablesRequestFile "C:\\samples\\edittables.json"
$ws | Set-AzSynapseLinkConnectionLinkTable -LinkConnectionName ContosoLinkConnection -EditTablesRequestFile "C:\samples\edittables.json"
```

This command edits link tables under link connection ContosoLinkConnection in workspace ContosoWorkspace through pipeline.
Expand All @@ -59,7 +82,7 @@ This file includes information about edited link table.
### Example 3
```powershell
$lc = Get-AzSynapseLinkConnection -WorkspaceName ContosoWorkspace -Name ContosoLinkConnection
$lc | Set-AzSynapseLinkConnectionLinkTable -EditTablesRequestFile "C:\\samples\\edittables.json"
$lc | Set-AzSynapseLinkConnectionLinkTable -EditTablesRequestFile "C:\samples\edittables.json"
```

This command edits link tables under a link connection through pipeline.
Expand Down

0 comments on commit 8616829

Please sign in to comment.