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

SQL Output: UI and config gen service updates #86

Merged
merged 6 commits into from
Jun 20, 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
300 changes: 164 additions & 136 deletions DeploymentCloud/Deployment.Common/CosmosDB/commons.json
Original file line number Diff line number Diff line change
Expand Up @@ -348,149 +348,177 @@
"type" : "scopedObject",
"namespace" : "output",
"namespaceField" : "name",
"fields" : {
"blob" : {
"type" : "object",
"namespace" : "blob",
"fields" : {
"groupEvaluation" : "groupevaluation",
"compressionType" : {
"type" : "excludeDefaultValue",
"namespace" : "compressiontype",
"defaultValue" : "gzip"
},
"format" : {
"type" : "excludeDefaultValue",
"namespace" : "format",
"defaultValue" : "json"
},
"groups" : {
"type" : "map",
"namespace" : "group",
"fields" : {
"folder" : "folder"
}
}
}
},
"eventhub" : {
"type" : "object",
"namespace" : "eventhub",
"fields" : {
"connectionStringRef" : "connectionstring",
"compressionType" : {
"type" : "excludeDefaultValue",
"namespace" : "compressiontype",
"defaultValue" : "gzip"
},
"format" : {
"type" : "excludeDefaultValue",
"namespace" : "format",
"defaultValue" : "json"
},
"appendProperties" : {
"type" : "mapProps",
"namespace" : "appendproperty"
}
}
},
"cosmosdb" : {
"type" : "object",
"namespace" : "cosmosdb",
"fields" : {
"connectionStringRef" : "connectionstring",
"database" : "database",
"collection" : "collection"
}
},
"httpPost" : {
"type" : "object",
"namespace" : "httppost",
"fields" : {
"endpoint" : "endpoint",
"filter" : "filter",
"appendHeaders" : {
"type" : "mapProps",
"namespace" : "header"
}
}
}
}
"fields": {
"blob": {
"type": "object",
"namespace": "blob",
"fields": {
"groupEvaluation": "groupevaluation",
"compressionType": {
"type": "excludeDefaultValue",
"namespace": "compressiontype",
"defaultValue": "gzip"
},
"format": {
"type": "excludeDefaultValue",
"namespace": "format",
"defaultValue": "json"
},
"groups": {
"type": "map",
"namespace": "group",
"fields": {
"folder": "folder"
}
}
}
},
"eventhub": {
"type": "object",
"namespace": "eventhub",
"fields": {
"connectionStringRef": "connectionstring",
"compressionType": {
"type": "excludeDefaultValue",
"namespace": "compressiontype",
"defaultValue": "gzip"
},
"format": {
"type": "excludeDefaultValue",
"namespace": "format",
"defaultValue": "json"
},
"appendProperties": {
"type": "mapProps",
"namespace": "appendproperty"
}
}
},
"cosmosdb": {
"type": "object",
"namespace": "cosmosdb",
"fields": {
"connectionStringRef": "connectionstring",
"database": "database",
"collection": "collection"
}
},
"httpPost": {
"type": "object",
"namespace": "httppost",
"fields": {
"endpoint": "endpoint",
"filter": "filter",
"appendHeaders": {
"type": "mapProps",
"namespace": "header"
}
}
},
"sqlServer": {
"type": "object",
"namespace": "sql",
"fields": {
"connectionStringRef": "connectionstring",
"databaseName": "databasename",
"tableName": "table",
"writeMode": "writemode",
"useBulkInsert": "usebulkinsert",
"url": "url",
"user": "user",
"password": "password"
}
}
}
},
"outputs" : {
"type" : "array",
"element" : {
"type" : "scopedObject",
"namespace" : "output",
"namespaceField" : "name",
"fields" : {
"blob" : {
"type" : "object",
"namespace" : "blob",
"fields" : {
"groupEvaluation" : "groupevaluation",
"compressionType" : {
"type" : "excludeDefaultValue",
"namespace" : "compressiontype",
"defaultValue" : "gzip"
},
"format" : {
"type" : "excludeDefaultValue",
"namespace" : "format",
"defaultValue" : "json"
},
"groups" : {
"type" : "map",
"namespace" : "group",
"fields" : {
"folder" : "folder"
}
}
}
},
"eventhub" : {
"type" : "object",
"namespace" : "eventhub",
"fields" : {
"connectionStringRef" : "connectionstring",
"compressionType" : {
"type" : "excludeDefaultValue",
"namespace" : "compressiontype",
"defaultValue" : "gzip"
},
"format" : {
"type" : "excludeDefaultValue",
"namespace" : "format",
"defaultValue" : "json"
},
"appendProperties" : {
"type" : "mapProps",
"namespace" : "appendproperty"
}
}
},
"cosmosdb" : {
"type" : "object",
"namespace" : "cosmosdb",
"fields" : {
"connectionStringRef" : "connectionstring",
"database" : "database",
"collection" : "collection"
}
},
"httpPost" : {
"type" : "object",
"namespace" : "httppost",
"fields" : {
"endpoint" : "endpoint",
"filter" : "filter",
"appendHeaders" : {
"type" : "mapProps",
"namespace" : "header"
}
}
}
}
"fields": {
"blob": {
"type": "object",
"namespace": "blob",
"fields": {
"groupEvaluation": "groupevaluation",
"compressionType": {
"type": "excludeDefaultValue",
"namespace": "compressiontype",
"defaultValue": "gzip"
},
"format": {
"type": "excludeDefaultValue",
"namespace": "format",
"defaultValue": "json"
},
"groups": {
"type": "map",
"namespace": "group",
"fields": {
"folder": "folder"
}
}
}
},
"eventhub": {
"type": "object",
"namespace": "eventhub",
"fields": {
"connectionStringRef": "connectionstring",
"compressionType": {
"type": "excludeDefaultValue",
"namespace": "compressiontype",
"defaultValue": "gzip"
},
"format": {
"type": "excludeDefaultValue",
"namespace": "format",
"defaultValue": "json"
},
"appendProperties": {
"type": "mapProps",
"namespace": "appendproperty"
}
}
},
"cosmosdb": {
"type": "object",
"namespace": "cosmosdb",
"fields": {
"connectionStringRef": "connectionstring",
"database": "database",
"collection": "collection"
}
},
"httpPost": {
"type": "object",
"namespace": "httppost",
"fields": {
"endpoint": "endpoint",
"filter": "filter",
"appendHeaders": {
"type": "mapProps",
"namespace": "header"
}
}
},
"sqlServer": {
"type": "object",
"namespace": "sql",
"fields": {
"connectionStringRef": "connectionstring",
"databaseName": "databasename",
"tableName": "table",
"writeMode": "writemode",
"useBulkInsert": "usebulkinsert",
"url": "url",
"user": "user",
"password": "password"
}
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace DataX.Config.ConfigDataModel
{
// Class representing union schema of all supported ouputs (Blob, CosmosDB, EventHub, Metrics)
// Class representing union schema of all supported ouputs (Blob, CosmosDB, EventHub, SQL Server, Metrics)
public class FlowGuiOutputProperties
{
[JsonProperty("connectionString", NullValueHandling = NullValueHandling.Ignore)]
Expand All @@ -32,5 +32,14 @@ public class FlowGuiOutputProperties

[JsonProperty("collection", NullValueHandling = NullValueHandling.Ignore)]
public string Collection;

[JsonProperty("tableName", NullValueHandling = NullValueHandling.Ignore)]
public string TableName;

[JsonProperty("writeMode", NullValueHandling = NullValueHandling.Ignore)]
public string WriteMode;

[JsonProperty("useBulkInsert", NullValueHandling = NullValueHandling.Ignore)]
public string UseBulkInsert;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ public class FlowOutputSpec
[JsonProperty("httppost", NullValueHandling = NullValueHandling.Ignore)]
public FlowHttpOutputSpec HttpOutput { get; set; }

[JsonProperty("sqlServer", NullValueHandling = NullValueHandling.Ignore)]
public FlowSqlOutputSpec SqlOutput { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// *********************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License
// *********************************************************************
using Newtonsoft.Json;

namespace DataX.Config.ConfigDataModel.RuntimeConfig
{
public class FlowSqlOutputSpec
{
[JsonProperty("connectionStringRef")]
public string ConnectionStringRef { get; set; }

[JsonProperty("tableName")]
public string TableName { get; set; }

[JsonProperty("databaseName")]
public string DatabaseName { get; set; }

[JsonProperty("user")]
public string User { get; set; }

[JsonProperty("password")]
public string Password { get; set; }

[JsonProperty("url")]
public string Url { get; set; }

[JsonProperty("writeMode")]
public string WriteMode { get; set; }

[JsonProperty("useBulkInsert")]
public string UseBulkInsert { get; set; }
}
}
Loading