This command executes data preview/stats preview/expression preview for different streams of data flow in debug session. The PowerShell command sequence for data flow debug workflow should be:
Start-AzSynapseDataFlowDebugSession
Add-AzSynapseDataFlowDebugSessionPackage
Invoke-AzSynapseDataFlowDebugSessionCommand (repeat this step for different commands/targets, or repeat step 2-3 in order to change the package file)
Stop-AzSynapseDataFlowDebugSession
Examples
Example 1
$result = Invoke-AzSynapseDataFlowDebugSessionCommand -WorkspaceName ContosoWorkspace -Command executePreviewQuery -SessionId 3afb278e-ac5f-469f-a0b6-2f04c3ab59bc -StreamName source1 -RowLimit 100 -AsJob
$result | Format-Table -wrap
Id Name PSJobTypeName State HasMoreData Location Command
-- ---- ------------- ----- ----------- -------- -------
1 Long Running Operation AzureLongRunningJob`1 Completed True localhost Invoke-AzSynapseDataFlowDebugSessionCommand
for 'Invoke-AzSynapseD
ataFlowDebugSessionCommand'
$output = ConvertFrom-Json($result.Output.Data)
$output.output
{
"schema": "output(ResourceAgencyNum as string, PublicName as string)" ,
"data": [["4445679354", "Syrian Refugee Information", 1], ["44456793", "Syrian Refugee Information", 1]]
}
This example invokes data preview command for debug session "3afb278e-ac5f-469f-a0b6-2f04c3ab59bc" in Synapse workspace "ContosoWorkspace" and then convert the JSON output into readable string.
This example invokes data preview command for debug session "3afb278e-ac5f-469f-a0b6-2f04c3ab59bc" in Synapse workspace "ContosoWorkspace" through pipeline.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.