-
Notifications
You must be signed in to change notification settings - Fork 4k
[Data Factory] Add data flow and debug session cmdlets #10177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…to jikma/adddataflow
package.SessionId = SessionId; | ||
} | ||
|
||
DataFactoryClient.AddDataFlowToDebugSession(ResourceGroupName, DataFactoryName, package); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to actually implement ShouldProcess, see: https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/design-guidelines/should-process-confirm-impact.md
HelpMessage = Constants.HelpDataFlowDebugRowLimits)] | ||
[Parameter(ParameterSetName = ParameterSetNames.ByResourceId, Position = 4, Mandatory = false, | ||
HelpMessage = Constants.HelpDataFlowDebugRowLimits)] | ||
public int? RowLimits { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plural
HelpMessage = Constants.HelpDataFlowDebugColumns)] | ||
[Parameter(ParameterSetName = ParameterSetNames.ByResourceId, Position = 6, Mandatory = false, | ||
HelpMessage = Constants.HelpDataFlowDebugColumns)] | ||
public List<string> Columns { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plural
} | ||
|
||
}; | ||
WriteObject(DataFactoryClient.InvokeDataFlowDebugSessionCommand(ResourceGroupName, DataFactoryName, request)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to actually implement ShouldProcess
request.IntegrationRuntime = integrationRuntimeResource; | ||
} | ||
|
||
WriteObject(DataFactoryClient.StartDebugSession(ResourceGroupName, DataFactoryName, request)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ShouldProcess implementation required
--- | ||
external help file: Microsoft.Azure.PowerShell.Cmdlets.DataFactoryV2.dll-Help.xml | ||
Module Name: Az.DataFactory | ||
online version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment
--- | ||
external help file: Microsoft.Azure.PowerShell.Cmdlets.DataFactoryV2.dll-Help.xml | ||
Module Name: Az.DataFactory | ||
online version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment
```powershell | ||
PS C:\> Set-AzDataFactoryV2DataFlow -ResourceGroupName "ADF" -DataFactoryName "UncycloADF" -Name "TaxiDemo1" -DefinitionFile "C:\\samples\\UncycloSample\\TaxiDemo1.json" | ||
|
||
DataFlowName : TaxiDemo1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
table format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is list format
--- | ||
external help file: Microsoft.Azure.PowerShell.Cmdlets.DataFactoryV2.dll-Help.xml | ||
Module Name: Az.DataFactory | ||
online version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need online version
--- | ||
external help file: Microsoft.Azure.PowerShell.Cmdlets.DataFactoryV2.dll-Help.xml | ||
Module Name: Az.DataFactory | ||
online version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
online version
Thanks @markcowl for the quick review! I just addressed the feedbacks. |
{ | ||
[Cmdlet("Stop", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "DataFactoryV2DataFlowDebugSession", DefaultParameterSetName = ParameterSetNames.ByFactoryName, SupportsShouldProcess = true)] | ||
[OutputType(typeof(void))] | ||
[OutputType(typeof(string))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It outputs bool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what I did :P it's fixed.
namespace Microsoft.Azure.Commands.DataFactoryV2 | ||
{ | ||
[Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "DataFactoryV2DataFlow", DefaultParameterSetName = ParameterSetNames.ByFactoryName,SupportsShouldProcess = true), OutputType(typeof(void))] | ||
public class RemoveAzureDataFactoryDataFlowCommand : DataFactoryContextActionBaseCmdlet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this returning string?
```powershell | ||
PS C:\> Get-AzDataFactoryV2DataFlow -ResourceGroupName "ADF" -DataFactoryName "UncycloADF" | ||
|
||
DataFlowName : TaxiDemo1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is list format
```powershell | ||
PS C:\> Get-AzDataFactoryV2DataFlow -ResourceGroupName "ADF" -DataFactoryName "UncycloADF" -Name "dataflow1" | ||
|
||
DataFlowName : dataflow1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
list format. You will need to have a format entry for this in order to have a table format, see: https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/generate-format.ps1xml-file.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see. I thought I need to include a example to show how to convert to a table format result 😅, will update my pr soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generation tool doesn't work with "Could not load file or assembly 'System.Runtime.Loader, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified." error (I tried to change the version to 4.0.0 in csproj and I got a different error with something about assembly context). For now I just added manually into format file instead and it should still work if someone uses the script to generate the file in the future.
```powershell | ||
PS C:\WINDOWS\system32> Get-AzDataFactoryV2DataFlowDebugSession -ResourceGroupName adf -DataFactoryName UncycloADF | ||
|
||
DataFlowName : DebugSession-0a7e0d6e-f2b7-48cc-8cd8-618326f5662f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still lidt format
|
||
Id Name PSJobTypeName State HasMoreData Location Command | ||
-- ---- ------------- ----- ----------- -------- ------- | ||
3 Long Running... AzureLongRun... Running True localhost Invoke-AzDataFactoryV2... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this is table format)
```powershell | ||
PS C:\> Set-AzDataFactoryV2DataFlow -ResourceGroupName "ADF" -DataFactoryName "UncycloADF" -Name "TaxiDemo1" -DefinitionFile "C:\\samples\\UncycloSample\\TaxiDemo1.json" | ||
|
||
DataFlowName : TaxiDemo1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is list format
Description
Design review tickets:
https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/388
https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/390
Changes:
Checklist
CONTRIBUTING.md
ChangeLog.md
file(s) has been updated:ChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header -- no new version header should be added