This command executes data preview/stats preview/expression preview for different stream of data flow in debug session.
The PowerShell command sequence for data flow debug workflow should be:
Start-AzDataFactoryV2DataFlowDebugSession
Add-AzDataFactoryV2DataFlowDebugSessionPackage
Invoke-AzDataFactoryV2DataFlowDebugSessionCommand (repeat this step for different commands/targets, or repeat step 2-3 in order to change the package file)
Stop-AzDataFactoryV2DataFlowDebugSession
Examples
Example 1
$result = Invoke-AzDataFactoryV2DataFlowDebugSessionCommand -ResourceGroupName adf -DataFactoryName WiKiADF -Command executePreviewQuery -SessionId fd76cd0d-8b37-4dc0-a370-3f9d43ac686d -StreamName source1 -RowLimit 100 -AsJob
$result
Id Name PSJobTypeName State HasMoreData Location Command
-- ---- ------------- ----- ----------- -------- -------
3 Long Running... AzureLongRun... Running True localhost Invoke-AzDataFactoryV2...
(After 2 minutes)
$result
Id Name PSJobTypeName State HasMoreData Location Command
-- ---- ------------- ----- ----------- -------- -------
3 Long Running... AzureLongRun... Completed True localhost Invoke-AzDataFactoryV2...
$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 "fd76cd0d-8b37-4dc0-a370-3f9d43ac686d" in data factory "WiKiADF" and then convert the JSON output into readable string.
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.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.