From 0202c5eac187db2e56ca8e7059a8c3bd8f77a257 Mon Sep 17 00:00:00 2001 From: Jingshu923 <52914166+Jingshu923@users.noreply.github.com> Date: Tue, 24 Nov 2020 09:54:48 +0800 Subject: [PATCH] [DataFactory] Set computeType, coreCount to object type to allow expressions (#16804) * [DataFactory] Set computeType, coreCount to object type to allow expressions * Add a test * Change PartitionOption to object to allow expression * Add test cases --- .../datafactory_resource-manager.txt | 4 +- .../src/CHANGELOG.md | 2 + .../src/Generated/Models/AzureSqlSource.cs | 12 +-- .../Models/ExecuteDataFlowActivity.cs | 40 +++++++++- ...teDataFlowActivityTypePropertiesCompute.cs | 18 +++-- .../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 | 2 + .../tests/JsonSamples/PipelineJsonSamples.cs | 77 ++++++++++++++++--- 16 files changed, 184 insertions(+), 82 deletions(-) diff --git a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt index caf5b506a3d24..ee4baa4227e77 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-18 07:45:56 UTC Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: e86a6eed316503ed17c2f7dfab94b2fa0f0c4129 +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 e640883fba74f..49055e53b72a4 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md @@ -7,6 +7,8 @@ - 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 +- 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/Generated/Models/AzureSqlSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlSource.cs index f0f16e36471c3..95c31c0aa1170 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 a62b2be1db431..89e58fed41961 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/ExecuteDataFlowActivityTypePropertiesCompute.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.cs index 89eb4bbec7113..52661554e508e 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/Generated/Models/NetezzaSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaSource.cs index 8fb594325c2ff..2d08c13302c35 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 059ee63e35f1b..3890e6bb13b25 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 88592f71a5aaa..8066234e249ea 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 39a48d79f60d3..489adcb7b61b5 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 118d41686a6cb..3480547562e6a 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 9ce8caf7515c1..6e589dd30c9d5 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 fc60faec5577d..ded60832a476a 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 3edbbb8349880..47ef7c198f90a 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 515880a573489..7d885348796a6 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 d61aa980da1b4..e182795416f43 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,8 @@ - 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 +- 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 97b69bd54d5ac..772361a2d3e09 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: { @@ -6441,6 +6448,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] @@ -6740,7 +6792,10 @@ public class PipelineJsonSamples : JsonSampleCollection { ""type"": ""SapHanaSource"", ""query"": ""$select=Column0"", - ""partitionOption"": ""SapHanaDynamicRange"", + ""partitionOption"": { + ""value"": ""pipeline().parameters.parallelOption"", + ""type"": ""Expression"" + }, ""partitionSettings"": { ""partitionColumnName"": ""INTEGERTYPE"" }