Skip to content

Commit 684a236

Browse files
lee1961victorleewyunchi-ms
authored
[DataFlow] add additional cmd parameter for quick reuse of cluster fo… (#15878)
* [DataFlow] add additional cmd parameter for quick reuse of cluster for dataflow commands * added additional details to changelog and constants * manually tested and set appropriate field when reuse flag is used * fixed the reuse flag being set and changelog * fix comments and null check * update changelog Co-authored-by: victorlee <[email protected]> Co-authored-by: Yunchi Wang <[email protected]>
1 parent 4929e40 commit 684a236

File tree

5 files changed

+46
-2
lines changed

5 files changed

+46
-2
lines changed

src/DataFactory/DataFactoryV2/Changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added a DataFlowEnableQuickReuse argument for the `Set-AzDataFactoryV2IntegrationRuntime` cmdlet to enable quick reuse of clusters in next pipeline activities.
2122
* Updated ADF .Net SDK version to 4.25.0
2223
* Added a VNetInjectionMethod argument for the `Set-AzDataFactoryV2IntegrationRuntime` cmdlet to support the express virtual network injection of Azure-SSIS Integration Runtime.
2324

@@ -146,4 +147,4 @@ to enable create Azure-SSIS IR with static public IP addresses.
146147

147148
## Version 1.0.0
148149
* General availability of `Az.DataFactory` module
149-
* Removed -LinkedServiceName parameter from Get-AzDataFactoryV2ActivityRun
150+
* Removed -LinkedServiceName parameter from Get-AzDataFactoryV2ActivityRun

src/DataFactory/DataFactoryV2/Constants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ internal static class Constants
152152

153153
public const string HelpIntegrationRuntimeDataFlowComputeType = "Compute type of the data flow cluster which will execute data flow job.";
154154

155+
public const string HelpIntegrationRuntimeDataFlowQuickReuseEnabled = "Enable data flow flow cluster reuse in the next data flow activity run.";
156+
155157
public const string HelpIntegrationRuntimeDataFlowTimeToLive = "Time to live (in minutes) setting of the data flow cluster which will execute data flow job.";
156158

157159
public const string HelpIntegrationRuntimeSetupScriptContainerSasUri = "The SAS URI of the Azure blob container that contains the custom setup script.";

src/DataFactory/DataFactoryV2/IntegrationRuntimes/SetAzureDataFactoryIntegrationRuntimeCommand.cs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,20 @@ public class SetAzureDataFactoryIntegrationRuntimeCommand : IntegrationRuntimeCm
292292
[ValidateNotNullOrEmpty]
293293
public string DataFlowComputeType { get; set; }
294294

295+
[Parameter(
296+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
297+
Mandatory = false,
298+
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowQuickReuseEnabled)]
299+
[Parameter(
300+
ParameterSetName = ParameterSetNames.ByResourceId,
301+
Mandatory = false,
302+
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowQuickReuseEnabled)]
303+
[Parameter(
304+
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject,
305+
Mandatory = false,
306+
HelpMessage = Constants.HelpIntegrationRuntimeDataFlowQuickReuseEnabled)]
307+
public SwitchParameter DataFlowEnableQuickReuse { get; set; }
308+
295309
[Parameter(
296310
ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,
297311
Mandatory = false,
@@ -759,7 +773,7 @@ private void HandleManagedIntegrationRuntime(ManagedIntegrationRuntime integrati
759773
integrationRuntime, VNetInjectionMethod, SubnetId, Subnet, VNetId
760774
);
761775

762-
if (!string.IsNullOrWhiteSpace(DataFlowComputeType) || DataFlowCoreCount != null || DataFlowTimeToLive != null)
776+
if (!string.IsNullOrWhiteSpace(DataFlowComputeType) || DataFlowCoreCount != null || DataFlowTimeToLive != null || DataFlowEnableQuickReuse != null)
763777
{
764778
if (integrationRuntime.ComputeProperties == null)
765779
{
@@ -773,6 +787,16 @@ private void HandleManagedIntegrationRuntime(ManagedIntegrationRuntime integrati
773787
integrationRuntime.ComputeProperties.DataFlowProperties.ComputeType = DataFlowComputeType ?? integrationRuntime.ComputeProperties.DataFlowProperties.ComputeType;
774788
integrationRuntime.ComputeProperties.DataFlowProperties.CoreCount = DataFlowCoreCount ?? integrationRuntime.ComputeProperties.DataFlowProperties.CoreCount;
775789
integrationRuntime.ComputeProperties.DataFlowProperties.TimeToLive = DataFlowTimeToLive ?? integrationRuntime.ComputeProperties.DataFlowProperties.TimeToLive;
790+
if (DataFlowEnableQuickReuse.IsPresent)
791+
{
792+
integrationRuntime.ComputeProperties.DataFlowProperties.Cleanup = false;
793+
}
794+
else
795+
{
796+
// setting it as null as the default value for the cleanup variable is false, and the backend endpoint treats null value as true.
797+
integrationRuntime.ComputeProperties.DataFlowProperties.Cleanup = null;
798+
}
799+
776800
}
777801

778802
if (PublicIPs != null)

src/DataFactory/DataFactoryV2/Models/PSManagedIntegrationRuntime.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ public PSManagedIntegrationRuntime(
7272

7373
public int? DataFlowTimeToLive => ManagedIntegrationRuntime.ComputeProperties?.DataFlowProperties?.TimeToLive;
7474

75+
public bool? DataFlowEnableCleanUp => ManagedIntegrationRuntime.ComputeProperties?.DataFlowProperties.Cleanup;
76+
7577
public string State => ManagedIntegrationRuntime.State;
7678

7779
public string LicenseType => ManagedIntegrationRuntime.SsisProperties?.LicenseType;

src/DataFactory/DataFactoryV2/help/Set-AzDataFactoryV2IntegrationRuntime.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,21 @@ Accept pipeline input: False
268268
Accept wildcard characters: False
269269
```
270270
271+
### -DataFlowEnableQuickReuse
272+
To whether enable data flow cluster to be reused in the next dataflow activity.
273+
274+
```yaml
275+
Type: System.Management.Automation.SwitchParameter
276+
Parameter Sets: (All)
277+
Aliases:
278+
279+
Required: False
280+
Position: Named
281+
Default value: None
282+
Accept pipeline input: False
283+
Accept wildcard characters: False
284+
```
285+
271286
### -DataProxyIntegrationRuntimeName
272287
The Self-Hosted Integration Runtime name which is used as a proxy
273288

0 commit comments

Comments
 (0)