Skip to content

Commit a310b1a

Browse files
authored
Merge pull request #4 from RoelantVos/Development_Branch_v1.1
Development branch v1.1
2 parents e17cca1 + d24d395 commit a310b1a

16 files changed

+596
-80
lines changed

ClassLibrary/DataWarehouseAutomation/DataWarehouseAutomation.sln

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.28307.779
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29920.165
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataWarehouseAutomation", "DataWarehouseAutomation\DataWarehouseAutomation.csproj", "{F0458983-9646-42E6-9E18-90AD91288B40}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataWarehouseAutomation", "DataWarehouseAutomation\DataWarehouseAutomation.csproj", "{F0458983-9646-42E6-9E18-90AD91288B40}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D3FD1325-9F54-481B-8363-BC1CF463F589}"
9+
ProjectSection(SolutionItems) = preProject
10+
..\..\GenericInterface\interfaceDataWarehouseAutomationMetadata.json = ..\..\GenericInterface\interfaceDataWarehouseAutomationMetadata.json
11+
EndProjectSection
912
EndProject
1013
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example_Handlebars", "..\..\Examples\DV_Handlebars\Example_Handlebars.csproj", "{F77AC518-6300-4927-8775-B92CDF15CC8E}"
1114
EndProject

ClassLibrary/DataWarehouseAutomation/DataWarehouseAutomation/BusinessKey.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,16 @@ namespace DataWarehouseAutomation
88
/// </summary>
99
public class BusinessKey
1010
{
11-
[JsonProperty]
11+
/// <summary>
12+
/// Items that define the Business Key e.g. the collection of columns for a Business Key.
13+
/// </summary>
14+
[JsonProperty("businessKeyComponentMapping")]
1215
public List<DataItemMapping> businessKeyComponentMapping { get; set; }
16+
17+
/// <summary>
18+
/// An optional label for the end result e.g. the target business key attribute.
19+
/// </summary>
20+
[JsonProperty("surrogateKey")]
1321
public string surrogateKey { get; set; }
1422
}
1523
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using Newtonsoft.Json;
2+
3+
namespace DataWarehouseAutomation
4+
{
5+
/// <summary>
6+
/// A free form list of classifications (labels) and notes to add to a source-to-target mapping
7+
/// </summary>
8+
public class Classification
9+
{
10+
/// <summary>
11+
/// Optional identifier for the classification
12+
/// </summary>
13+
[JsonProperty("id")]
14+
public int id { get; set; }
15+
16+
/// <summary>
17+
/// Type description, usually a keyword used for automation purposes.
18+
/// </summary>
19+
[JsonProperty("classification")]
20+
public string classification { get; set; }
21+
22+
/// <summary>
23+
/// Free-format notes on the classification.
24+
/// </summary>
25+
[JsonProperty("notes")]
26+
public string notes { get; set; }
27+
}
28+
}

ClassLibrary/DataWarehouseAutomation/DataWarehouseAutomation/DataConnection.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ namespace DataWarehouseAutomation
1010
/// </summary>
1111
public class DataConnection
1212
{
13-
[JsonProperty]
13+
/// <summary>
14+
/// The connection information expressed in a key, token or (connection)string.
15+
/// </summary>
16+
[JsonProperty("dataConnectionString")]
1417
public string dataConnectionString { get; set; }
1518
}
1619
}
Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,38 @@
11
using Newtonsoft.Json;
2-
using System;
32
using System.Collections.Generic;
4-
using System.Text;
53

64
namespace DataWarehouseAutomation
75
{
86
public class DataObject
97
{
10-
[JsonProperty]
8+
/// <summary>
9+
/// An optional identifier for the Data Object.
10+
/// </summary>
11+
[JsonProperty("id")]
1112
public int id { get; set; }
13+
14+
/// <summary>
15+
/// The name of the Data Object.
16+
/// </summary>
17+
[JsonProperty("name")]
1218
public string name { get; set; }
1319

20+
/// <summary>
21+
/// The collection of Data Items associated with this Data Object.
22+
/// </summary>
23+
[JsonProperty("dataItems")]
1424
public List<DataItem> dataItems { get; set; }
1525

26+
/// <summary>
27+
/// The connection information associated to the Data Object.
28+
/// </summary>
29+
[JsonProperty("dataObjectConnection")]
1630
public DataConnection dataObjectConnection { get; set; }
31+
32+
/// <summary>
33+
/// Free-form and optional classification for the Data Object for use in ETL generation logic (evaluation).
34+
/// </summary>
35+
[JsonProperty("dataObjectClassification")]
36+
public List<Classification> dataObjectClassification { get; set; }
1737
}
1838
}

ClassLibrary/DataWarehouseAutomation/DataWarehouseAutomation/DataObjectMapping.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,11 @@ public class DataObjectMapping
1515
[JsonProperty("mappingName")]
1616
public string mappingName { get; set; }
1717

18-
/// <summary>
19-
/// TEMPORARY - NEEDS REFACTORING IN RELATED DATA OBJECT CONCEPT
20-
/// </summary>
21-
[JsonProperty("lookupTable")]
22-
public string lookupTable { get; set; }
23-
2418
/// <summary>
2519
/// Free-form and optional classification for the mapping for use in ETL generation logic (evaluation).
2620
/// </summary>
2721
[JsonProperty("mappingClassification")]
28-
public List<DataObjectMappingClassification> mappingClassification { get; set; }
22+
public List<Classification> mappingClassification { get; set; }
2923

3024
/// <summary>
3125
/// The source object of the mapping.
@@ -39,6 +33,13 @@ public class DataObjectMapping
3933
[JsonProperty("targetDataObject")]
4034
public DataObject targetDataObject { get; set; }
4135

36+
/// <summary>
37+
/// Optional associated data object (collection) for purposes other than source- and target relationship.
38+
/// For example Lookups, merge joins etc.
39+
/// </summary>
40+
[JsonProperty("relatedDataObject")]
41+
public List<DataObject> relatedDataObject { get; set; }
42+
4243
/// <summary>
4344
/// The collection of individual attribute (column) mappings.
4445
/// </summary>

ClassLibrary/DataWarehouseAutomation/DataWarehouseAutomation/DataObjectMappingClassification.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using Newtonsoft.Json;
4+
5+
namespace DataWarehouseAutomation
6+
{
7+
public class DataQuery
8+
{
9+
/// <summary>
10+
/// An optional name for the query.
11+
/// </summary>
12+
[JsonProperty("dataQueryName")]
13+
public string dataQueryName { get; set; }
14+
15+
/// <summary>
16+
/// The actual code that constitutes the query.
17+
/// </summary>
18+
[JsonProperty("dataQueryCode")]
19+
public string dataQueryCode { get; set; }
20+
21+
/// <summary>
22+
/// The language that the code was written in (e.g. SQL).
23+
/// </summary>
24+
[JsonProperty("dataQueryLanguage")]
25+
public string dataQueryLanguage { get; set; }
26+
27+
/// <summary>
28+
/// The connection for the query.
29+
/// </summary>
30+
[JsonProperty("dataQueryConnection")]
31+
public DataConnection dataQueryConnection { get; set; }
32+
}
33+
}

ClassLibrary/DataWarehouseAutomation/Test_Project/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ static void Main(string[] args)
1919
fileList.Add(AppDomain.CurrentDomain.BaseDirectory + @"..\..\SampleFiles\sampleTEAM_LSAT.json"); // Validating a Json generated by TEAM / VDW
2020
fileList.Add(AppDomain.CurrentDomain.BaseDirectory + @"..\..\SampleFiles\sampleVDW_Hub.json"); // Validating a Json generated by TEAM / VDW
2121
fileList.Add(AppDomain.CurrentDomain.BaseDirectory + @"..\..\SampleFiles\sampleVDW_StagingArea.json"); // Validating a Json generated by TEAM / VDW
22+
fileList.Add(AppDomain.CurrentDomain.BaseDirectory + @"..\..\sampleFiles\sampleVDW_HubWithLookup.json"); // Validating a Json generated by TEAM / VDW
23+
fileList.Add(AppDomain.CurrentDomain.BaseDirectory + @"..\..\sampleFiles\sampleTEAMv16.json"); // Validating a Json generated by TEAM / VDW
2224

2325
foreach (string jsonFile in fileList)
2426
{

ClassLibrary/DataWarehouseAutomation/Test_Project/SampleFiles/sampleSourceQuery.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
{
44
"mappingName": "Mapping1",
55
"sourceDataObject": {
6-
"dataQueryCode": "SELECT GETDATE()"
6+
"dataQueryCode": "SELECT GETDATE()",
7+
"dataQueryConnection": {
8+
"dataConnectionString": "TestConnectionString"
9+
}
710
},
811
"targetDataObject": {
912
"name": "TableOneTarget"

0 commit comments

Comments
 (0)