From 13e0420e08b766dfd503c19b3db8a4adb5f4ed3d Mon Sep 17 00:00:00 2001 From: Jingshu Pan Date: Tue, 10 Nov 2020 10:47:06 +0800 Subject: [PATCH 1/4] [DataFactory] Set computeType, coreCount to object type to allow expressions --- .../datafactory_resource-manager.txt | 4 ++-- .../src/CHANGELOG.md | 1 + ...uteDataFlowActivityTypePropertiesCompute.cs | 18 +++++++++++------- ...crosoft.Azure.Management.DataFactory.csproj | 1 + 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt index caf5b506a3d2..fee0eaf8e1c6 100644 --- a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt +++ b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt @@ -4,11 +4,11 @@ Commencing code generation Generating CSharp code Executing AutoRest command cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datafactory/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=D:\Projects\azure-sdk-for-net\sdk -2020-10-28 02:50:39 UTC +2020-11-10 02:30:44 UTC Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: e86a6eed316503ed17c2f7dfab94b2fa0f0c4129 +Commit: f8f89f01c1d1438ea2ef835105712ca3c610a978 AutoRest information Requested version: v2 Bootstrapper version: autorest@2.0.4413 diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md index e640883fba74..f07db1e1bed9 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md @@ -7,6 +7,7 @@ - Added connectionProperties property into Concur linkedService - Added authenticationType and sessionToken properties into AmazonS3 linkedService - Added support for more frequency types for TumblingWindowTrigger +- Set computeType, coreCount to object type to allow expressions ## Version 4.12.0 ### Feature Additions diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.cs index 89eb4bbec711..52661554e508 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.cs @@ -33,11 +33,13 @@ public ExecuteDataFlowActivityTypePropertiesCompute() /// /// Compute type of the cluster which will /// execute data flow job. Possible values include: 'General', - /// 'MemoryOptimized', 'ComputeOptimized' + /// 'MemoryOptimized', 'ComputeOptimized'. Type: string (or Expression + /// with resultType string) /// Core count of the cluster which will /// execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 - /// and 272. - public ExecuteDataFlowActivityTypePropertiesCompute(string computeType = default(string), int? coreCount = default(int?)) + /// and 272. Type: integer (or Expression with resultType + /// integer) + public ExecuteDataFlowActivityTypePropertiesCompute(object computeType = default(object), object coreCount = default(object)) { ComputeType = computeType; CoreCount = coreCount; @@ -52,17 +54,19 @@ public ExecuteDataFlowActivityTypePropertiesCompute() /// /// Gets or sets compute type of the cluster which will execute data /// flow job. Possible values include: 'General', 'MemoryOptimized', - /// 'ComputeOptimized' + /// 'ComputeOptimized'. Type: string (or Expression with resultType + /// string) /// [JsonProperty(PropertyName = "computeType")] - public string ComputeType { get; set; } + public object ComputeType { get; set; } /// /// Gets or sets core count of the cluster which will execute data flow - /// job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. + /// job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. Type: + /// integer (or Expression with resultType integer) /// [JsonProperty(PropertyName = "coreCount")] - public int? CoreCount { get; set; } + public object CoreCount { get; set; } } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj index d61aa980da1b..63201b5cc786 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj @@ -15,6 +15,7 @@ - Added connectionProperties property into Concur linkedService - Added authenticationType and sessionToken properties into AmazonS3 linkedService - Added support for more frequency types for TumblingWindowTrigger +- Set computeType, coreCount to object type to allow expressions ]]> From a75494578527c9ba6c9af68ee3c369d9580666bf Mon Sep 17 00:00:00 2001 From: Jingshu Pan Date: Tue, 10 Nov 2020 13:56:15 +0800 Subject: [PATCH 2/4] Add a test --- .../tests/JsonSamples/PipelineJsonSamples.cs | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs index 97b69bd54d5a..5382a2833566 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs @@ -6441,6 +6441,51 @@ public class PipelineJsonSamples : JsonSampleCollection ] } } +"; + + [JsonSample] + public const string ExecuteDataFlowActivityPipelineWithExpression = @" +{ + name: ""My Execute Data Flow Activity pipeline"", + properties: + { + activities: + [ + { + name: ""TestActivity"", + description: ""Test activity description"", + type: ""ExecuteDataFlow"", + typeProperties: { + dataFlow: { + referenceName: ""referenced1"", + type: ""DataFlowReference"" + }, + staging: { + linkedService: { + referenceName: ""referenced2"", + type: ""LinkedServiceReference"" + }, + folderPath: ""adfjobs/staging"" + }, + integrationRuntime: { + referenceName: ""dataflowIR10minTTL"", + type: ""IntegrationRuntimeReference"" + }, + compute: { + computeType: { + value: ""@parameters('MemoryOptimized')"", + type: ""Expression"" + }, + coreCount: { + value: ""@parameters('8')"", + type: ""Expression"" + }, + } + } + } + ] + } +} "; [JsonSample] From c26804146d8109a4678bd9d2bb583a73daa2b491 Mon Sep 17 00:00:00 2001 From: Jingshu Pan Date: Wed, 18 Nov 2020 15:54:23 +0800 Subject: [PATCH 3/4] Change PartitionOption to object to allow expression --- .../datafactory_resource-manager.txt | 4 +- .../src/CHANGELOG.md | 1 + .../src/Generated/Models/AzureSqlSource.cs | 12 +++--- .../Models/ExecuteDataFlowActivity.cs | 40 ++++++++++++++++++- .../src/Generated/Models/NetezzaSource.cs | 12 +++--- .../src/Generated/Models/OracleSource.cs | 12 +++--- .../src/Generated/Models/SapHanaSource.cs | 11 ++--- .../src/Generated/Models/SapTableSource.cs | 18 ++++----- .../src/Generated/Models/SqlDWSource.cs | 12 +++--- .../src/Generated/Models/SqlMISource.cs | 12 +++--- .../src/Generated/Models/SqlServerSource.cs | 12 +++--- .../src/Generated/Models/SqlSource.cs | 12 +++--- .../src/Generated/Models/TeradataSource.cs | 10 ++--- ...rosoft.Azure.Management.DataFactory.csproj | 1 + 14 files changed, 105 insertions(+), 64 deletions(-) diff --git a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt index fee0eaf8e1c6..ee4baa4227e7 100644 --- a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt +++ b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt @@ -4,11 +4,11 @@ Commencing code generation Generating CSharp code Executing AutoRest command cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datafactory/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=D:\Projects\azure-sdk-for-net\sdk -2020-11-10 02:30:44 UTC +2020-11-18 07:45:56 UTC Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: f8f89f01c1d1438ea2ef835105712ca3c610a978 +Commit: 146aefa430221f1dba5befb2d8dad17b8e4c88b7 AutoRest information Requested version: v2 Bootstrapper version: autorest@2.0.4413 diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md index f07db1e1bed9..7f1503341e2b 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md @@ -8,6 +8,7 @@ - Added authenticationType and sessionToken properties into AmazonS3 linkedService - Added support for more frequency types for TumblingWindowTrigger - Set computeType, coreCount to object type to allow expressions +- Change PartitionOption to object to allow expression ## Version 4.12.0 ### Feature Additions diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlSource.cs index f0f16e36471c..95c31c0aa117 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlSource.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlSource.cs @@ -59,11 +59,11 @@ public AzureSqlSource() /// Which additional types to /// produce. /// The partition mechanism that will be - /// used for Sql read in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'DynamicRange' + /// used for Sql read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". /// The settings that will be leveraged /// for Sql source partitioning. - public AzureSqlSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), IDictionary storedProcedureParameters = default(IDictionary), object produceAdditionalTypes = default(object), string partitionOption = default(string), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) + public AzureSqlSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), IDictionary storedProcedureParameters = default(IDictionary), object produceAdditionalTypes = default(object), object partitionOption = default(object), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, queryTimeout, additionalColumns) { SqlReaderQuery = sqlReaderQuery; @@ -110,11 +110,11 @@ public AzureSqlSource() /// /// Gets or sets the partition mechanism that will be used for Sql read - /// in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'DynamicRange' + /// in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". /// [JsonProperty(PropertyName = "partitionOption")] - public string PartitionOption { get; set; } + public object PartitionOption { get; set; } /// /// Gets or sets the settings that will be leveraged for Sql source diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivity.cs index a62b2be1db43..89e58fed4196 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivity.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivity.cs @@ -51,13 +51,27 @@ public ExecuteDataFlowActivity() /// reference. /// Compute properties for data flow /// activity. - public ExecuteDataFlowActivity(string name, DataFlowReference dataFlow, IDictionary additionalProperties = default(IDictionary), string description = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), DataFlowStagingInfo staging = default(DataFlowStagingInfo), IntegrationRuntimeReference integrationRuntime = default(IntegrationRuntimeReference), ExecuteDataFlowActivityTypePropertiesCompute compute = default(ExecuteDataFlowActivityTypePropertiesCompute)) + /// Trace level setting used for data flow + /// monitoring output. Supported values are: 'coarse', 'fine', and + /// 'none'. Type: string (or Expression with resultType string) + /// Continue on error setting used for + /// data flow execution. Enables processing to continue if a sink + /// fails. Type: boolean (or Expression with resultType + /// boolean) + /// Concurrent run setting used for data + /// flow execution. Allows sinks with the same save order to be + /// processed concurrently. Type: boolean (or Expression with + /// resultType boolean) + public ExecuteDataFlowActivity(string name, DataFlowReference dataFlow, IDictionary additionalProperties = default(IDictionary), string description = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), DataFlowStagingInfo staging = default(DataFlowStagingInfo), IntegrationRuntimeReference integrationRuntime = default(IntegrationRuntimeReference), ExecuteDataFlowActivityTypePropertiesCompute compute = default(ExecuteDataFlowActivityTypePropertiesCompute), object traceLevel = default(object), object continueOnError = default(object), object runConcurrently = default(object)) : base(name, additionalProperties, description, dependsOn, userProperties, linkedServiceName, policy) { DataFlow = dataFlow; Staging = staging; IntegrationRuntime = integrationRuntime; Compute = compute; + TraceLevel = traceLevel; + ContinueOnError = continueOnError; + RunConcurrently = runConcurrently; CustomInit(); } @@ -90,6 +104,30 @@ public ExecuteDataFlowActivity() [JsonProperty(PropertyName = "typeProperties.compute")] public ExecuteDataFlowActivityTypePropertiesCompute Compute { get; set; } + /// + /// Gets or sets trace level setting used for data flow monitoring + /// output. Supported values are: 'coarse', 'fine', and 'none'. Type: + /// string (or Expression with resultType string) + /// + [JsonProperty(PropertyName = "typeProperties.traceLevel")] + public object TraceLevel { get; set; } + + /// + /// Gets or sets continue on error setting used for data flow + /// execution. Enables processing to continue if a sink fails. Type: + /// boolean (or Expression with resultType boolean) + /// + [JsonProperty(PropertyName = "typeProperties.continueOnError")] + public object ContinueOnError { get; set; } + + /// + /// Gets or sets concurrent run setting used for data flow execution. + /// Allows sinks with the same save order to be processed concurrently. + /// Type: boolean (or Expression with resultType boolean) + /// + [JsonProperty(PropertyName = "typeProperties.runConcurrently")] + public object RunConcurrently { get; set; } + /// /// Validate the object. /// diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaSource.cs index 8fb594325c2f..2d08c13302c3 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaSource.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaSource.cs @@ -50,11 +50,11 @@ public NetezzaSource() /// A query to retrieve data from source. Type: /// string (or Expression with resultType string). /// The partition mechanism that will be - /// used for Netezza read in parallel. Possible values include: 'None', - /// 'DataSlice', 'DynamicRange' + /// used for Netezza read in parallel. Possible values include: "None", + /// "DataSlice", "DynamicRange". /// The settings that will be leveraged /// for Netezza source partitioning. - public NetezzaSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object query = default(object), string partitionOption = default(string), NetezzaPartitionSettings partitionSettings = default(NetezzaPartitionSettings)) + public NetezzaSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object query = default(object), object partitionOption = default(object), NetezzaPartitionSettings partitionSettings = default(NetezzaPartitionSettings)) : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, queryTimeout, additionalColumns) { Query = query; @@ -77,11 +77,11 @@ public NetezzaSource() /// /// Gets or sets the partition mechanism that will be used for Netezza - /// read in parallel. Possible values include: 'None', 'DataSlice', - /// 'DynamicRange' + /// read in parallel. Possible values include: "None", "DataSlice", + /// "DynamicRange". /// [JsonProperty(PropertyName = "partitionOption")] - public string PartitionOption { get; set; } + public object PartitionOption { get; set; } /// /// Gets or sets the settings that will be leveraged for Netezza source diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleSource.cs index 059ee63e35f1..3890e6bb13b2 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleSource.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleSource.cs @@ -47,14 +47,14 @@ public OracleSource() /// Expression with resultType string), pattern: /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). /// The partition mechanism that will be - /// used for Oracle read in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'DynamicRange' + /// used for Oracle read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". /// The settings that will be leveraged /// for Oracle source partitioning. /// Specifies the additional columns to /// be added to source data. Type: array of objects (or Expression with /// resultType array of objects). - public OracleSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object oracleReaderQuery = default(object), object queryTimeout = default(object), string partitionOption = default(string), OraclePartitionSettings partitionSettings = default(OraclePartitionSettings), IList additionalColumns = default(IList)) + public OracleSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object oracleReaderQuery = default(object), object queryTimeout = default(object), object partitionOption = default(object), OraclePartitionSettings partitionSettings = default(OraclePartitionSettings), IList additionalColumns = default(IList)) : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections) { OracleReaderQuery = oracleReaderQuery; @@ -87,11 +87,11 @@ public OracleSource() /// /// Gets or sets the partition mechanism that will be used for Oracle - /// read in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'DynamicRange' + /// read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". /// [JsonProperty(PropertyName = "partitionOption")] - public string PartitionOption { get; set; } + public object PartitionOption { get; set; } /// /// Gets or sets the settings that will be leveraged for Oracle source diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaSource.cs index 88592f71a5aa..8066234e249e 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaSource.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaSource.cs @@ -53,10 +53,11 @@ public SapHanaSource() /// HANA. Type: integer(or Expression with resultType integer). /// The partition mechanism that will be /// used for SAP HANA read in parallel. Possible values include: - /// 'None', 'PhysicalPartitionsOfTable', 'SapHanaDynamicRange' + /// "None", "PhysicalPartitionsOfTable", "SapHanaDynamicRange". + /// /// The settings that will be leveraged /// for SAP HANA source partitioning. - public SapHanaSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object query = default(object), object packetSize = default(object), string partitionOption = default(string), SapHanaPartitionSettings partitionSettings = default(SapHanaPartitionSettings)) + public SapHanaSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object query = default(object), object packetSize = default(object), object partitionOption = default(object), SapHanaPartitionSettings partitionSettings = default(SapHanaPartitionSettings)) : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, queryTimeout, additionalColumns) { Query = query; @@ -87,11 +88,11 @@ public SapHanaSource() /// /// Gets or sets the partition mechanism that will be used for SAP HANA - /// read in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'SapHanaDynamicRange' + /// read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "SapHanaDynamicRange". /// [JsonProperty(PropertyName = "partitionOption")] - public string PartitionOption { get; set; } + public object PartitionOption { get; set; } /// /// Gets or sets the settings that will be leveraged for SAP HANA diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableSource.cs index 39a48d79f60d..489adcb7b61b 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableSource.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableSource.cs @@ -69,12 +69,12 @@ public SapTableSource() /// string). /// The partition mechanism that will be /// used for SAP table read in parallel. Possible values include: - /// 'None', 'PartitionOnInt', 'PartitionOnCalendarYear', - /// 'PartitionOnCalendarMonth', 'PartitionOnCalendarDate', - /// 'PartitionOnTime' + /// "None", "PartitionOnInt", "PartitionOnCalendarYear", + /// "PartitionOnCalendarMonth", "PartitionOnCalendarDate", + /// "PartitionOnTime". /// The settings that will be leveraged /// for SAP table source partitioning. - public SapTableSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object rowCount = default(object), object rowSkips = default(object), object rfcTableFields = default(object), object rfcTableOptions = default(object), object batchSize = default(object), object customRfcReadTableFunctionModule = default(object), object sapDataColumnDelimiter = default(object), string partitionOption = default(string), SapTablePartitionSettings partitionSettings = default(SapTablePartitionSettings)) + public SapTableSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object rowCount = default(object), object rowSkips = default(object), object rfcTableFields = default(object), object rfcTableOptions = default(object), object batchSize = default(object), object customRfcReadTableFunctionModule = default(object), object sapDataColumnDelimiter = default(object), object partitionOption = default(object), SapTablePartitionSettings partitionSettings = default(SapTablePartitionSettings)) : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, queryTimeout, additionalColumns) { RowCount = rowCount; @@ -150,13 +150,13 @@ public SapTableSource() /// /// Gets or sets the partition mechanism that will be used for SAP - /// table read in parallel. Possible values include: 'None', - /// 'PartitionOnInt', 'PartitionOnCalendarYear', - /// 'PartitionOnCalendarMonth', 'PartitionOnCalendarDate', - /// 'PartitionOnTime' + /// table read in parallel. Possible values include: "None", + /// "PartitionOnInt", "PartitionOnCalendarYear", + /// "PartitionOnCalendarMonth", "PartitionOnCalendarDate", + /// "PartitionOnTime". /// [JsonProperty(PropertyName = "partitionOption")] - public string PartitionOption { get; set; } + public object PartitionOption { get; set; } /// /// Gets or sets the settings that will be leveraged for SAP table diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWSource.cs index 118d41686a6c..3480547562e6 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWSource.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWSource.cs @@ -58,11 +58,11 @@ public SqlDWSource() /// type: "int"}}". Type: object (or Expression with resultType /// object), itemType: StoredProcedureParameter. /// The partition mechanism that will be - /// used for Sql read in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'DynamicRange' + /// used for Sql read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". /// The settings that will be leveraged /// for Sql source partitioning. - public SqlDWSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), object storedProcedureParameters = default(object), string partitionOption = default(string), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) + public SqlDWSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), object storedProcedureParameters = default(object), object partitionOption = default(object), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, queryTimeout, additionalColumns) { SqlReaderQuery = sqlReaderQuery; @@ -104,11 +104,11 @@ public SqlDWSource() /// /// Gets or sets the partition mechanism that will be used for Sql read - /// in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'DynamicRange' + /// in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". /// [JsonProperty(PropertyName = "partitionOption")] - public string PartitionOption { get; set; } + public object PartitionOption { get; set; } /// /// Gets or sets the settings that will be leveraged for Sql source diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlMISource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlMISource.cs index 9ce8caf7515c..6e589dd30c9d 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlMISource.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlMISource.cs @@ -59,11 +59,11 @@ public SqlMISource() /// Which additional types to /// produce. /// The partition mechanism that will be - /// used for Sql read in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'DynamicRange' + /// used for Sql read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". /// The settings that will be leveraged /// for Sql source partitioning. - public SqlMISource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), IDictionary storedProcedureParameters = default(IDictionary), object produceAdditionalTypes = default(object), string partitionOption = default(string), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) + public SqlMISource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), IDictionary storedProcedureParameters = default(IDictionary), object produceAdditionalTypes = default(object), object partitionOption = default(object), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, queryTimeout, additionalColumns) { SqlReaderQuery = sqlReaderQuery; @@ -111,11 +111,11 @@ public SqlMISource() /// /// Gets or sets the partition mechanism that will be used for Sql read - /// in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'DynamicRange' + /// in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". /// [JsonProperty(PropertyName = "partitionOption")] - public string PartitionOption { get; set; } + public object PartitionOption { get; set; } /// /// Gets or sets the settings that will be leveraged for Sql source diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerSource.cs index fc60faec5577..ded60832a476 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerSource.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerSource.cs @@ -59,11 +59,11 @@ public SqlServerSource() /// Which additional types to /// produce. /// The partition mechanism that will be - /// used for Sql read in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'DynamicRange' + /// used for Sql read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". /// The settings that will be leveraged /// for Sql source partitioning. - public SqlServerSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), IDictionary storedProcedureParameters = default(IDictionary), object produceAdditionalTypes = default(object), string partitionOption = default(string), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) + public SqlServerSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), IDictionary storedProcedureParameters = default(IDictionary), object produceAdditionalTypes = default(object), object partitionOption = default(object), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, queryTimeout, additionalColumns) { SqlReaderQuery = sqlReaderQuery; @@ -110,11 +110,11 @@ public SqlServerSource() /// /// Gets or sets the partition mechanism that will be used for Sql read - /// in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'DynamicRange' + /// in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". /// [JsonProperty(PropertyName = "partitionOption")] - public string PartitionOption { get; set; } + public object PartitionOption { get; set; } /// /// Gets or sets the settings that will be leveraged for Sql source diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlSource.cs index 3edbbb834988..47ef7c198f90 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlSource.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlSource.cs @@ -62,11 +62,11 @@ public SqlSource() /// The default value is ReadCommitted. Type: string (or Expression /// with resultType string). /// The partition mechanism that will be - /// used for Sql read in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'DynamicRange' + /// used for Sql read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". /// The settings that will be leveraged /// for Sql source partitioning. - public SqlSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), IDictionary storedProcedureParameters = default(IDictionary), object isolationLevel = default(object), string partitionOption = default(string), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) + public SqlSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), IDictionary storedProcedureParameters = default(IDictionary), object isolationLevel = default(object), object partitionOption = default(object), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, queryTimeout, additionalColumns) { SqlReaderQuery = sqlReaderQuery; @@ -117,11 +117,11 @@ public SqlSource() /// /// Gets or sets the partition mechanism that will be used for Sql read - /// in parallel. Possible values include: 'None', - /// 'PhysicalPartitionsOfTable', 'DynamicRange' + /// in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". /// [JsonProperty(PropertyName = "partitionOption")] - public string PartitionOption { get; set; } + public object PartitionOption { get; set; } /// /// Gets or sets the settings that will be leveraged for Sql source diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataSource.cs index 515880a57348..7d885348796a 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataSource.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataSource.cs @@ -51,10 +51,10 @@ public TeradataSource() /// with resultType string). /// The partition mechanism that will be /// used for teradata read in parallel. Possible values include: - /// 'None', 'Hash', 'DynamicRange' + /// "None", "Hash", "DynamicRange". /// The settings that will be leveraged /// for teradata source partitioning. - public TeradataSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object query = default(object), string partitionOption = default(string), TeradataPartitionSettings partitionSettings = default(TeradataPartitionSettings)) + public TeradataSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object queryTimeout = default(object), IList additionalColumns = default(IList), object query = default(object), object partitionOption = default(object), TeradataPartitionSettings partitionSettings = default(TeradataPartitionSettings)) : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, queryTimeout, additionalColumns) { Query = query; @@ -77,11 +77,11 @@ public TeradataSource() /// /// Gets or sets the partition mechanism that will be used for teradata - /// read in parallel. Possible values include: 'None', 'Hash', - /// 'DynamicRange' + /// read in parallel. Possible values include: "None", "Hash", + /// "DynamicRange". /// [JsonProperty(PropertyName = "partitionOption")] - public string PartitionOption { get; set; } + public object PartitionOption { get; set; } /// /// Gets or sets the settings that will be leveraged for teradata diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj index 63201b5cc786..26f85688d851 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj @@ -16,6 +16,7 @@ - Added authenticationType and sessionToken properties into AmazonS3 linkedService - Added support for more frequency types for TumblingWindowTrigger - Set computeType, coreCount to object type to allow expressions +- Change PartitionOption to object to allow expression ]]> From f0d1e0dba7aed3534179a02ac363388121f78878 Mon Sep 17 00:00:00 2001 From: Jingshu Pan Date: Wed, 18 Nov 2020 16:17:55 +0800 Subject: [PATCH 4/4] Add test cases --- .../src/CHANGELOG.md | 2 +- ...rosoft.Azure.Management.DataFactory.csproj | 2 +- .../tests/JsonSamples/PipelineJsonSamples.cs | 32 ++++++++++++------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md index 7f1503341e2b..49055e53b72a 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md @@ -8,7 +8,7 @@ - Added authenticationType and sessionToken properties into AmazonS3 linkedService - Added support for more frequency types for TumblingWindowTrigger - Set computeType, coreCount to object type to allow expressions -- Change PartitionOption to object to allow expression +- Change property PartitionOption type to object for NetezzaSource, OracleSource, SapHanaSource, SapTableSource, SqlDWSource, SqlMISource, SqlServerSource, SqlSource, TeradataSource. ## Version 4.12.0 ### Feature Additions diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj index 26f85688d851..e182795416f4 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj @@ -16,7 +16,7 @@ - Added authenticationType and sessionToken properties into AmazonS3 linkedService - Added support for more frequency types for TumblingWindowTrigger - Set computeType, coreCount to object type to allow expressions -- Change PartitionOption to object to allow expression +- Change property PartitionOption type to object for NetezzaSource, OracleSource, SapHanaSource, SapTableSource, SqlDWSource, SqlMISource, SqlServerSource, SqlSource, TeradataSource. ]]> diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs index 5382a2833566..772361a2d3e0 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs @@ -599,7 +599,10 @@ public class PipelineJsonSamples : JsonSampleCollection { type: ""AzureSqlSource"", sqlReaderQuery: ""$EncryptedString$MyEncryptedQuery"", - parallelOption: ""DynamicRange"", + partitionOption: { + ""value"": ""pipeline().parameters.parallelOption"", + ""type"": ""Expression"" + }, partitionSettings: { partitionColumnName: ""partitionColumnName"", @@ -5610,13 +5613,11 @@ public class PipelineJsonSamples : JsonSampleCollection ""typeProperties"": { ""source"": { ""type"": ""TeradataSource"", - ""partitionOption"": ""DynamicRange"", - ""partitionSettings"": { - ""partitionColumnName"": ""EmployeeKey"", - ""partitionUpperBound"": ""1"", - ""partitionLowerBound"": ""500"" - } - }, + ""partitionOption"": { + ""value"": ""pipeline().parameters.parallelOption"", + ""type"": ""Expression"" + } + }, ""sink"": { ""type"": ""BinarySink"", ""storeSettings"": { @@ -5873,7 +5874,10 @@ public class PipelineJsonSamples : JsonSampleCollection type: ""SapTableSource"", rowCount: 3, sapDataColumnDelimiter: ""|"", - partitionOption: ""PartitionOnCalendarDate"", + partitionOption: { + ""value"": ""pipeline().parameters.parallelOption"", + ""type"": ""Expression"" + }, partitionSettings: { ""partitionColumnName"": ""fakeColumn"", @@ -6042,7 +6046,10 @@ public class PipelineJsonSamples : JsonSampleCollection source: { type: ""NetezzaSource"", - partitionOption: ""DataSlice"" + partitionOption: { + ""value"": ""pipeline().parameters.parallelOption"", + ""type"": ""Expression"" + }, }, sink: { @@ -6785,7 +6792,10 @@ public class PipelineJsonSamples : JsonSampleCollection { ""type"": ""SapHanaSource"", ""query"": ""$select=Column0"", - ""partitionOption"": ""SapHanaDynamicRange"", + ""partitionOption"": { + ""value"": ""pipeline().parameters.parallelOption"", + ""type"": ""Expression"" + }, ""partitionSettings"": { ""partitionColumnName"": ""INTEGERTYPE"" }