Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Datafactory]SDK Change for SapOpenHub and Rest #5260

Merged
merged 2 commits into from
Feb 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -872,5 +872,47 @@ public class DatasetJsonSamples : JsonSampleCollection<DatasetJsonSamples>
}
}
";
[JsonSample]
public const string SapOpenHubDataset = @"
{
""name"": ""SAPBWOpenHubDataset"",
""properties"": {
""type"": ""SapOpenHubTable"",
""linkedServiceName"": {
""referenceName"": ""OpenHubLinkedService"",
""type"": ""LinkedServiceReference""
},
""typeProperties"": {
""openHubDestinationName"": ""fakeOhdName"",
""excludeLastRequest"": true,
""baseRequestId"": 231
}
}
}
";

[JsonSample]
public const string RestDataset = @"
{
""name"": ""RESTDataset"",
""properties"": {
""type"": ""RestResource"",
""linkedServiceName"": {
""referenceName"": ""RestLinkedService"",
""type"": ""LinkedServiceReference""
},
""typeProperties"": {
""relativeUrl"": ""https://fakeurl/"",
""additionalHeaders"": {
""x-user-defined"": ""helloworld""
},
""paginationRules"": {
""AbsoluteUrl"": ""$.paging.next""
}
}
}
}
";

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1991,5 +1991,42 @@ public class LinkedServiceJsonSamples : JsonSampleCollection<LinkedServiceJsonSa
}
}
}";

[JsonSample]
public const string SapOpenHubLinkedService = @"
{
""name"": ""SapBwOpenHubLinkedService"",
""properties"": {
""type"": ""SapOpenHub"",
""typeProperties"": {
""server"": ""fakeserver"",
""systemNumber"": ""00"",
""clientId"": ""800"",
""userName"": ""fakeusr"",
""password"": {
""type"": ""SecureString"",
""value"": ""fakepsw""
}
}
}
}";

[JsonSample]
public const string RestLinkedService = @"
{
""name"": ""RESTLinkedService"",
""properties"": {
""type"": ""RestService"",
""typeProperties"": {
""authenticationType"": ""Basic"",
""url"" : ""https://fakeurl/"",
""userName"": ""fakeusr"",
""password"": {
""type"": ""SecureString"",
""value"": ""fakepsw""
}
}
}
}";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class PipelineJsonSamples : JsonSampleCollection<PipelineJsonSamples>
}
}
";
[JsonSample]
[JsonSample]
public const string CopyActivityWithSkipIncompatibleRows = @"
{
""name"": ""MyPipeline"",
Expand Down Expand Up @@ -122,7 +122,7 @@ public class PipelineJsonSamples : JsonSampleCollection<PipelineJsonSamples>
}
}
";


[JsonSample]
public const string ChainedActivitiesWithParametersPipeline = @"
Expand Down Expand Up @@ -1985,7 +1985,7 @@ public class PipelineJsonSamples : JsonSampleCollection<PipelineJsonSamples>
]
}
}";

[JsonSample]
public const string AzureMLBatchExecutionPipeline = @"
{
Expand Down Expand Up @@ -3392,5 +3392,108 @@ public class PipelineJsonSamples : JsonSampleCollection<PipelineJsonSamples>
}
}";

[JsonSample(version: "Copy")]
public const string CopySapOpenHubToAdls = @"
{
name: ""MyPipelineName"",
properties:
{
description : ""Copy from SAP Open Hub to Azure Data Lake Store"",
activities:
[
{
type: ""Copy"",
name: ""TestActivity"",
description: ""Test activity description"",
typeProperties:
{
source:
{
type: ""SapOpenHubSource""
},
sink:
{
type: ""AzureDataLakeStoreSink"",
copyBehavior: ""FlattenHierarchy""
}
},
inputs:
[
{
referenceName: ""InputSapOpenHub"", type: ""DatasetReference""
}
],
outputs:
[
{
referenceName: ""OutputAdlsDA"", type: ""DatasetReference""
}
],
linkedServiceName: { referenceName: ""MyLinkedServiceName"", type: ""LinkedServiceReference"" },
policy:
{
retry: 3,
timeout: ""00:00:05"",
}
}
]
}
}
";

[JsonSample(version: "Copy")]
public const string CopyRestToAdls = @"
{
name: ""MyPipelineName"",
properties:
{
description : ""Copy from REST to Azure Data Lake Store"",
activities:
[
{
type: ""Copy"",
name: ""TestActivity"",
description: ""Test activity description"",
typeProperties:
{
source:
{
type: ""RestSource"",
""httpRequestTimeout"": ""00:01:00""
},
sink:
{
type: ""AzureDataLakeStoreSink"",
copyBehavior: ""FlattenHierarchy""
},
translator:
{
type: ""TabularTranslator"",
collectionReference: ""$.fakekey""
}
},
inputs:
[
{
referenceName: ""InputRest"", type: ""DatasetReference""
}
],
outputs:
[
{
referenceName: ""OutputAdlsDA"", type: ""DatasetReference""
}
],
linkedServiceName: { referenceName: ""MyLinkedServiceName"", type: ""LinkedServiceReference"" },
policy:
{
retry: 3,
timeout: ""00:00:05"",
}
}
]
}
}
";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
// <auto-generated>
// 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.
// </auto-generated>

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;

/// <summary>
/// A Rest service dataset.
/// </summary>
[Newtonsoft.Json.JsonObject("RestResource")]
[Rest.Serialization.JsonTransformation]
public partial class RestResourceDataset : Dataset
{
/// <summary>
/// Initializes a new instance of the RestResourceDataset class.
/// </summary>
public RestResourceDataset()
{
LinkedServiceName = new LinkedServiceReference();
CustomInit();
}

/// <summary>
/// Initializes a new instance of the RestResourceDataset class.
/// </summary>
/// <param name="linkedServiceName">Linked service reference.</param>
/// <param name="additionalProperties">Unmatched properties from the
/// message are deserialized this collection</param>
/// <param name="description">Dataset description.</param>
/// <param name="structure">Columns that define the structure of the
/// dataset. Type: array (or Expression with resultType array),
/// itemType: DatasetDataElement.</param>
/// <param name="schema">Columns that define the physical type schema
/// of the dataset. Type: array (or Expression with resultType array),
/// itemType: DatasetSchemaDataElement.</param>
/// <param name="parameters">Parameters for dataset.</param>
/// <param name="annotations">List of tags that can be used for
/// describing the Dataset.</param>
/// <param name="folder">The folder that this Dataset is in. If not
/// specified, Dataset will appear at the root level.</param>
/// <param name="relativeUrl">The relative URL to the resource that the
/// RESTful API provides. Type: string (or Expression with resultType
/// string).</param>
/// <param name="requestMethod">The HTTP method used to call the
/// RESTful API. The default is GET. Type: string (or Expression with
/// resultType string).</param>
/// <param name="requestBody">The HTTP request body to the RESTful API
/// if requestMethod is POST. Type: string (or Expression with
/// resultType string).</param>
/// <param name="additionalHeaders">The additional HTTP headers in the
/// request to the RESTful API. Type: string (or Expression with
/// resultType string).</param>
/// <param name="paginationRules">The pagination rules to compose next
/// page requests. Type: string (or Expression with resultType
/// string).</param>
public RestResourceDataset(LinkedServiceReference linkedServiceName, IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string description = default(string), object structure = default(object), object schema = default(object), IDictionary<string, ParameterSpecification> parameters = default(IDictionary<string, ParameterSpecification>), IList<object> annotations = default(IList<object>), DatasetFolder folder = default(DatasetFolder), object relativeUrl = default(object), object requestMethod = default(object), object requestBody = default(object), object additionalHeaders = default(object), object paginationRules = default(object))
: base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder)
{
RelativeUrl = relativeUrl;
RequestMethod = requestMethod;
RequestBody = requestBody;
AdditionalHeaders = additionalHeaders;
PaginationRules = paginationRules;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets the relative URL to the resource that the RESTful API
/// provides. Type: string (or Expression with resultType string).
/// </summary>
[JsonProperty(PropertyName = "typeProperties.relativeUrl")]
public object RelativeUrl { get; set; }

/// <summary>
/// Gets or sets the HTTP method used to call the RESTful API. The
/// default is GET. Type: string (or Expression with resultType
/// string).
/// </summary>
[JsonProperty(PropertyName = "typeProperties.requestMethod")]
public object RequestMethod { get; set; }

/// <summary>
/// Gets or sets the HTTP request body to the RESTful API if
/// requestMethod is POST. Type: string (or Expression with resultType
/// string).
/// </summary>
[JsonProperty(PropertyName = "typeProperties.requestBody")]
public object RequestBody { get; set; }

/// <summary>
/// Gets or sets the additional HTTP headers in the request to the
/// RESTful API. Type: string (or Expression with resultType string).
/// </summary>
[JsonProperty(PropertyName = "typeProperties.additionalHeaders")]
public object AdditionalHeaders { get; set; }

/// <summary>
/// Gets or sets the pagination rules to compose next page requests.
/// Type: string (or Expression with resultType string).
/// </summary>
[JsonProperty(PropertyName = "typeProperties.paginationRules")]
public object PaginationRules { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public override void Validate()
{
base.Validate();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.DataFactory.Models
{

/// <summary>
/// Defines values for RestServiceAuthenticationType.
/// </summary>
public static class RestServiceAuthenticationType
{
public const string Anonymous = "Anonymous";
public const string Basic = "Basic";
public const string AadServicePrincipal = "AadServicePrincipal";
public const string ManagedServiceIdentity = "ManagedServiceIdentity";
}
}
Loading