diff --git a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt index 1118efb1de74..7b610bcce1f7 100644 --- a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt +++ b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt @@ -3,12 +3,12 @@ AutoRest installed successfully. 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:\Source\Repos\azure-sdk-for-net\sdk -2020-05-12 09:50:10 UTC +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:\Git\AdmsSdkChange\sdk +2020-05-26 06:33:38 UTC Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: 260aa3d5e9467700068787493861f92fc590800c +Commit: 98f100daf12446cbdc6359ba9b34e8a10f8410f3 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 f952e6243794..f54af3d20901 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog for the Azure Data Factory V2 .NET SDK +## Version 4.11.0 +### Feature Additions +- Added support for the follwoing new datasets in ADF - ExcelDataset, along with source and sink for Copy activity +- ExcelDataset will support following locations AzureBlobStorageLocation, AzureBlobFSLocation, AzureDataLakeStoreLocation, AmazonS3Location, FileServerLocation, FtpServerLocation, SftpLocation, HttpServerLocation, HdfsLocation + ## Version 4.10.0 ### Feature Additions - Added new type conversion support in Copy activity diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExcelDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExcelDataset.cs new file mode 100644 index 000000000000..7d28d92594b3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExcelDataset.cs @@ -0,0 +1,145 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Excel dataset. + /// + [Newtonsoft.Json.JsonObject("Excel")] + [Rest.Serialization.JsonTransformation] + public partial class ExcelDataset : Dataset + { + /// + /// Initializes a new instance of the ExcelDataset class. + /// + public ExcelDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ExcelDataset class. + /// + /// Linked service reference. + /// The location of the excel storage. + /// The sheet of excel file. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The partial data of one sheet. Type: string (or + /// Expression with resultType string). + /// When used as input, treat the first + /// row of data as headers. When used as output,write the headers into + /// the output as the first row of data. The default value is false. + /// Type: boolean (or Expression with resultType boolean). + /// The data compression method used for the + /// json dataset. + /// The null value string. Type: string (or + /// Expression with resultType string). + public ExcelDataset(LinkedServiceReference linkedServiceName, DatasetLocation location, object sheetName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object range = default(object), object firstRowAsHeader = default(object), DatasetCompression compression = default(DatasetCompression), object nullValue = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Location = location; + SheetName = sheetName; + Range = range; + FirstRowAsHeader = firstRowAsHeader; + Compression = compression; + NullValue = nullValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the location of the excel storage. + /// + [JsonProperty(PropertyName = "typeProperties.location")] + public DatasetLocation Location { get; set; } + + /// + /// Gets or sets the sheet of excel file. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.sheetName")] + public object SheetName { get; set; } + + /// + /// Gets or sets the partial data of one sheet. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.range")] + public object Range { get; set; } + + /// + /// Gets or sets when used as input, treat the first row of data as + /// headers. When used as output,write the headers into the output as + /// the first row of data. The default value is false. Type: boolean + /// (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.firstRowAsHeader")] + public object FirstRowAsHeader { get; set; } + + /// + /// Gets or sets the data compression method used for the json dataset. + /// + [JsonProperty(PropertyName = "typeProperties.compression")] + public DatasetCompression Compression { get; set; } + + /// + /// Gets or sets the null value string. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.nullValue")] + public object NullValue { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + if (SheetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SheetName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExcelSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExcelSource.cs new file mode 100644 index 000000000000..a698729e41f7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExcelSource.cs @@ -0,0 +1,76 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity excel source. + /// + public partial class ExcelSource : CopySource + { + /// + /// Initializes a new instance of the ExcelSource class. + /// + public ExcelSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExcelSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// Excel store settings. + /// Specifies the additional columns to + /// be added to source data. Type: array of objects (or Expression with + /// resultType array of objects). + public ExcelSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), StoreReadSettings storeSettings = default(StoreReadSettings), IList additionalColumns = default(IList)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections) + { + StoreSettings = storeSettings; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets excel store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreReadSettings StoreSettings { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects (or Expression with resultType array + /// of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public IList AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs index e938611bb8a6..40a91383da49 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs @@ -40,10 +40,10 @@ public static IEnumerable> ApiInfo_DataFactoryMana // BEGIN: Code Generation Metadata Section public static readonly String AutoRestVersion = "v2"; public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "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:\\Source\\Repos\\azure-sdk-for-net\\sdk"; + public static readonly String AutoRestCmdExecuted = "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:\\Git\\AdmsSdkChange\\sdk"; public static readonly String GithubForkName = "Azure"; public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "260aa3d5e9467700068787493861f92fc590800c"; + public static readonly String GithubCommidId = "98f100daf12446cbdc6359ba9b34e8a10f8410f3"; public static readonly String CodeGenerationErrors = ""; public static readonly String GithubRepoName = "azure-rest-api-specs"; // END: Code Generation Metadata Section diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/DatasetJsonSamples.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/DatasetJsonSamples.cs index 9c6ab51bff8b..e1e074eb5325 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/DatasetJsonSamples.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/DatasetJsonSamples.cs @@ -1028,6 +1028,43 @@ public class DatasetJsonSamples : JsonSampleCollection } } }"; + [JsonSample] + public const string ExcelDataset = @" +{ + ""name"": ""ExcelDataset"", + ""properties"": { + ""type"": ""Excel"", + ""typeProperties"": { + ""location"": { + ""type"": ""AzureBlobStorageLocation"", + ""container"": ""exceltest"", + ""fileName"": ""releases-1.xlsx"" + }, + ""compression"": { + ""type"": ""GZip"", + ""level"": ""Fastest"" + }, + ""sheetName"": ""test01"", + ""firstRowAsHeader"": true, + ""range"": ""A4:H9"", + ""nullValue"": ""N/A"" + }, + ""linkedServiceName"": { + ""referenceName"": ""MyLinkedService"", + ""type"": ""LinkedServiceReference"" + }, + ""schema"": [ + { + ""name"": ""title"", + ""type"": ""string"" + }, + { + ""name"": ""movieId"", + ""type"": ""string"" + } + ] + } +}"; [JsonSample] public const string ParquetDataset = @" 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 d609c363b9e1..e026abe7dba2 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs @@ -4181,6 +4181,53 @@ public class PipelineJsonSamples : JsonSampleCollection } }"; + [JsonSample] + public const string CopyActivity_Excel_Adls = @"{ + ""properties"": { + ""activities"": [ + { + ""type"": ""Copy"", + ""typeProperties"": { + ""source"": { + ""type"": ""ExcelSource"", + ""storeSettings"": { + ""type"": ""AzureDataLakeStoreReadSettings"", + ""recursive"": true, + ""enablePartitionDiscovery"": true + } + }, + ""sink"": { + ""type"": ""AvroSink"", + ""storeSettings"": { + ""type"": ""AzureDataLakeStoreWriteSettings"", + ""maxConcurrentConnections"": 3, + ""copyBehavior"": ""PreserveHierarchy"" + }, + ""formatSettings"": { + ""type"": ""AvroWriteSettings"", + ""recordName"": ""testavro"", + ""recordNamespace"": ""microsoft.datatransfer.test"" + } + } + }, + ""inputs"": [ + { + ""referenceName"": ""exampleDataset"", + ""type"": ""DatasetReference"" + } + ], + ""outputs"": [ + { + ""referenceName"": ""exampleDataset"", + ""type"": ""DatasetReference"" + } + ], + ""name"": ""ExampleCopyActivity"" + } + ] + } +}"; + [JsonSample] public const string CopyActivity_Orc_Adls = @"{ ""properties"": {