Bearbeiten

Freigeben über


Invoke-AzSynapseDataFlowDebugSessionCommand

Invoke debug action in data flow debug session.

Syntax

Invoke-AzSynapseDataFlowDebugSessionCommand
      -WorkspaceName <String>
      -SessionId <String>
      -Command <String>
      -StreamName <String>
      [-RowLimit <Int32>]
      [-Expression <String>]
      [-Column <System.Collections.Generic.List`1[System.String]>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Invoke-AzSynapseDataFlowDebugSessionCommand
      -WorkspaceObject <PSSynapseWorkspace>
      -SessionId <String>
      -Command <String>
      -StreamName <String>
      [-RowLimit <Int32>]
      [-Expression <String>]
      [-Column <System.Collections.Generic.List`1[System.String]>]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

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.

Example 2

$ws = Get-AzSynapseWorkspace -Name ContosoWorkspace
$ws | Invoke-AzSynapseDataFlowDebugSessionCommand -Command executePreviewQuery -SessionId 3afb278e-ac5f-469f-a0b6-2f04c3ab59bc -StreamName source1 -RowLimit 100

This example invokes data preview command for debug session "3afb278e-ac5f-469f-a0b6-2f04c3ab59bc" in Synapse workspace "ContosoWorkspace" through pipeline.

Parameters

-AsJob

Run cmdlet in the background

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

-Column

The column list for data flow statistics preview.

Type:List<T>[String]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Command

The data flow debug command. Optionals are executePreviewQuery, executeStatisticsQuery and executeExpressionQuery.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Expression

The expression for data flow expression preview.

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

-RowLimit

The row limit for data flow data preview.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SessionId

Identifier for Synapse data flow debug session.

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

-StreamName

The stream name of data flow for debugging.

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

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WorkspaceName

Name of Synapse workspace.

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

-WorkspaceObject

workspace input object, usually passed through the pipeline.

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

Inputs

PSSynapseWorkspace

Outputs

PSDataFlowDebugCommandResponse