Skip to content
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 @@ -402,5 +402,71 @@ public class DatasetJsonSamples : JsonSampleCollection<DatasetJsonSamples>
}
}
";
[JsonSample]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the samples, but I don't see any actual test updates

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these run automatically as part of LinkedService_SerializationTest, Dataset_SerializationTest and Activity_SerializationTest

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see the ClassData attribute on each

public const string AzureMySqlTable = @"
{
name: ""AzureMySqlTable"",
properties:
{
type: ""AzureMySqlTable"",
linkedServiceName:
{
referenceName : ""ls"",
type : ""LinkedServiceReference""
},
typeProperties:
{
tableName: ""$EncryptedString$MyEncryptedTableName""
}
}
}
";
[JsonSample]
public const string SalesforceDataset = @"
{
name: ""SalesforceDataset"",
properties:
{
type: ""SalesforceObject"",
typeProperties:
{
objectApiName: ""fakeObjectApiName""
},
linkedServiceName:
{
referenceName: ""SalesforceLinkedService"",
type: ""LinkedServiceReference""
}
}
}
";
[JsonSample]
public const string BlobTableWithJsonArray = @"
{
name: ""JsonArrayDataset"",
properties:
{
type: ""AzureBlob"",
linkedServiceName:
{
referenceName : ""ls"",
type : ""LinkedServiceReference""
},
typeProperties:
{
folderPath: ""MyContainer\\MySubFolder\\$Date\\$Time\\FileName$Date$Time\\{PartitionKey}"",
fileName: ""TestBlobName"",
format:
{
type: ""JsonFormat"",
nestingSeparator: "","",
filePattern: ""setOfObjects"",
encodingName: ""utf-8"",
jsonNodeReference: ""$.root"",
jsonPathDefinition: {PartitionKey:""$.PartitionKey"", RowKey:""$.RowKey"", p1:""p1"", p2:""p2""}
}
}
}
}";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,34 @@ public class LinkedServiceJsonSamples : JsonSampleCollection<LinkedServiceJsonSa
}
}";

[JsonSample]
public const string DynamicsLinkedService = @"
{
name: ""Test-Dynamics-LinkedService"",
properties:
{
type : ""Dynamics"",
connectVia : {
referenceName : ""Connection1"",
type : ""IntegrationRuntimeReference""
},
typeProperties :
{
deploymentType : ""Online"",
authenticationType : ""Office365"",
username : ""fakeuser@contoso.com"",
password : {
type : ""AzureKeyVaultSecret"",
secretName : ""fakeSecretName"",
store: {
type : ""LinkedServiceReference"",
referenceName : ""AKVLinkedService""
}
}
}
}
}";

[JsonSample]
public const string SalesforceLinkedService = @"
{
Expand All @@ -570,6 +598,38 @@ public class LinkedServiceJsonSamples : JsonSampleCollection<LinkedServiceJsonSa
}
}";

[JsonSample]
public const string SalesforceLinkedServiceWithAkv = @"
{
name: ""SalesforceLinkedServiceWithAkv"",
properties:
{
type: ""Salesforce"",
description: ""test description"",
typeProperties:
{
environmentUrl: ""url"",
username: ""admin"",
password : {
type : ""AzureKeyVaultSecret"",
secretName : ""fakeSecretName1"",
store : {
type : ""LinkedServiceReference"",
referenceName : ""fakeAKVLinkedService""
}
},
securityToken: {
type : ""AzureKeyVaultSecret"",
secretName : ""fakeSecretName2"",
store : {
type : ""LinkedServiceReference"",
referenceName : ""fakeAKVLinkedService""
}
}
}
}
}";

[JsonSample]
public const string MongoDbLinkedService = @"
{
Expand Down Expand Up @@ -810,5 +870,21 @@ public class LinkedServiceJsonSamples : JsonSampleCollection<LinkedServiceJsonSa
}
}
}";

[JsonSample]
public const string AzureMySqlLinkedService = @"
{
name: ""LinkedService-AzureMySQLDB"",
properties:
{
type: ""AzureMySql"",
typeProperties: {
connectionString: {
value : ""fakeConnString"",
type : ""SecureString""
}
}
}
}";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2055,5 +2055,116 @@ public class PipelineJsonSamples : JsonSampleCollection<PipelineJsonSamples>
}
}";

[JsonSample(version: "Copy")]
public const string CopyAzureMySqlToBlob = @"{
name: ""AzureMySqlToBlobPipeline"",
properties: {
activities: [
{
name: ""CopyFromAzureMySqlToBlob"",
type: ""Copy"",
inputs: [
{
referenceName: ""AzureMySQLDataset"", type: ""DatasetReference""
}
],
outputs: [
{
referenceName: ""AzureBlobOut"", type: ""DatasetReference""
}
],
policy: {
},
typeProperties: {
source: {
type: ""AzureMySqlSource"",
query:""select * from azuremysqltable""
},
sink: {
type: ""BlobSink""
}
}
}
]
}
}
";

[JsonSample(version: "Copy")]
public const string CopyFromSalesforceToSalesforce = @"
{
""name"": ""SalesforceToSalesforce"",
""properties"": {
""activities"": [
{
""name"": ""CopyFromSalesforceToSalesforce"",
""type"": ""Copy"",
""inputs"": [
{
""referenceName"": ""SalesforceSourceDataset"",
""type"": ""DatasetReference""
}
],
""outputs"": [
{
""referenceName"": ""SalesforceSinkDataset"",
""type"": ""DatasetReference""
}
],
""typeProperties"":
{
""source"":
{
""type"": ""SalesforceSource"",
""query"":""select Id from table"",
},
""sink"":
{
""type"": ""SalesforceSink"",
""writeBehavior"": ""Insert"",
""ignoreNullValues"": false
}
}
}
]
}
}";

[JsonSample(version: "Copy")]
public const string CopyFromDynamicsToDynamics = @"{
name: ""DynamicsToDynamicsPipeline"",
properties: {
activities: [
{
name: ""CopyFromDynamicsToDynamics"",
type: ""Copy"",
inputs: [
{
referenceName: ""DynamicsIn"", type: ""DatasetReference""
}
],
outputs: [
{
referenceName: ""DynamicsOut"", type: ""DatasetReference""
}
],
policy: {
},
typeProperties: {
source: {
type: ""DynamicsSource"",
query:""fetchXml query""
},
sink: {
type: ""DynamicsSink"",
writeBehavior: ""Upsert"",
ignoreNullValues: false
}
}
}
]
}
}
";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ private void Initialize()
new Iso8601TimeSpanConverter()
}
};
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<SecretBase>("type"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<SecretBase>("type"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<IntegrationRuntime>("type"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<IntegrationRuntime>("type"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<IntegrationRuntimeStatus>("type"));
Expand All @@ -374,8 +376,6 @@ private void Initialize()
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<Trigger>("type"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<WebLinkedServiceTypeProperties>("authenticationType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<WebLinkedServiceTypeProperties>("authenticationType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<AzureKeyVaultReference>("type"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<AzureKeyVaultReference>("type"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<DatasetCompression>("type"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<DatasetCompression>("type"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<DatasetStorageFormat>("type"));
Expand Down

This file was deleted.

Loading