Skip to content

Commit 74688ad

Browse files
committed
v1.6.5.1 wrap up
Bug fix release to support ongoing projects. The main improvement is the complete removal of custom Handlebars functions so that everything is used from the DataWarehouseAutomation classlibrary. Also, all patterns have been tested (and updated) to adjust to templating engine changes. All libraries have been updated to the latest version.
1 parent 8e25307 commit 74688ad

10 files changed

+50
-249
lines changed

Virtual_EDW/CustomTabPage.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using HandlebarsDotNet;
1010
using Newtonsoft.Json;
1111
using TEAM;
12+
using DataWarehouseAutomation;
1213

1314
namespace Virtual_Data_Warehouse
1415
{
@@ -100,8 +101,8 @@ public void SetSaveOutputFileFlag(bool value)
100101
/// </summary>
101102
public CustomTabPage(string classification, string notes, Dictionary<string, VDW_DataObjectMappingList> itemList)
102103
{
103-
// Register the Handlebars helpers (extensions)
104-
HandlebarsHelpers.RegisterHandleBarsHelpers();
104+
// Register the Handlebars helpers (extensions), these are maintained in the DataWarehouseAutomation class library.
105+
HandleBarsHelpers.RegisterHandleBarsHelpers();
105106

106107
this.ItemList = itemList;
107108

Virtual_EDW/Form_Main.cs

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,15 @@ public FormMain()
9393

9494
// Then load the environments file and current working environment.
9595
// The TeamEnvironmentCollection contains all the environments as specified in TEAM (environments file).
96-
TeamEnvironmentCollection.LoadTeamEnvironmentCollection(VdwConfigurationSettings.TeamEnvironmentFilePath);
96+
try
97+
{
98+
TeamEnvironmentCollection.LoadTeamEnvironmentCollection(
99+
VdwConfigurationSettings.TeamEnvironmentFilePath);
100+
}
101+
catch
102+
{
103+
richTextBoxInformationMain.AppendText("The root environment configuration file was not found. The following file was expected: "+ VdwConfigurationSettings.TeamEnvironmentFilePath+'.');
104+
}
97105

98106
VdwConfigurationSettings.ActiveEnvironment = TeamEnvironmentCollection.GetEnvironmentByKey(VdwConfigurationSettings.TeamSelectedEnvironmentInternalId);
99107

@@ -282,24 +290,32 @@ private void GridAutoLayoutLoadPatternCollection()
282290
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
283291
public void RunFileWatcher()
284292
{
285-
// Create a new FileSystemWatcher and set its properties.
286-
FileSystemWatcher watcher = new FileSystemWatcher
293+
try
287294
{
288-
Path = VdwConfigurationSettings.VdwInputPath,
289-
Filter = "*.json",
290-
};
295+
// Create a new FileSystemWatcher and set its properties.
296+
FileSystemWatcher watcher = new FileSystemWatcher
297+
{
298+
Path = VdwConfigurationSettings.VdwInputPath,
299+
Filter = "*.json",
300+
};
291301

292-
var timeOut = Task.Delay(500);
302+
var timeOut = Task.Delay(500);
293303

294-
// Add event handlers.
295-
watcher.Changed += FileWatcherOnChanged;
296-
watcher.Created += FileWatcherOnChanged;
297-
watcher.Deleted += FileWatcherOnChanged;
298-
watcher.Error += FileWatcherOnError;
304+
// Add event handlers.
305+
watcher.Changed += FileWatcherOnChanged;
306+
watcher.Created += FileWatcherOnChanged;
307+
watcher.Deleted += FileWatcherOnChanged;
308+
watcher.Error += FileWatcherOnError;
309+
310+
watcher.SynchronizingObject = this;
311+
// Begin watching.
312+
watcher.EnableRaisingEvents = true;
313+
}
314+
catch (Exception ex)
315+
{
316+
richTextBoxInformationMain.AppendText($"There was en error starting the file watcher: {ex}.");
317+
}
299318

300-
watcher.SynchronizingObject = this;
301-
// Begin watching.
302-
watcher.EnableRaisingEvents = true;
303319
}
304320

305321
private void FileWatcherOnError(object source, ErrorEventArgs e)

Virtual_EDW/HandlebarsHelpers.cs

Lines changed: 0 additions & 216 deletions
This file was deleted.
3 KB
Binary file not shown.

Virtual_EDW/LoadPatterns/loadPatternHubView.Handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ FROM
4040
{{sourceDataItems.0.name}} IS NOT NULL{{#unless @last}} AND{{/unless}}{{/each}}{{/each}}
4141
{{#if filterCriterion}}AND {{filterCriterion}}{{/if}}
4242
GROUP BY
43-
{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#each sourceDataItems}}{{#stringdiff isHardCodedValue "True"}}{{name}},{{/stringdiff}}{{/each}}{{/each}}{{/each}}
43+
{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#each sourceDataItems}}{{#stringcompare isHardCodedValue "True"}}{{else}}{{name}},{{/stringcompare}}{{/each}}{{/each}}{{/each}}
4444
{{../metadataConfiguration.recordSourceAttribute}}
4545
{{#unless @last}}UNION{{/unless}}
4646
{{/each}}

Virtual_EDW/LoadPatterns/loadPatternHubView_DBT_Snowflake.Handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ FROM
3636
{{sourceDataItems.0.name}} IS NOT NULL{{#unless @last}} AND{{/unless}}{{/each}}{{/each}}
3737
{{#if filterCriterion}}AND {{filterCriterion}}{{/if}}
3838
GROUP BY
39-
{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#each sourceDataItems}}{{#stringdiff isHardCodedValue "True"}}{{name}},{{/stringdiff}}{{/each}}{{/each}}{{/each}}
39+
{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#each sourceDataItems}}{{#stringcompare isHardCodedValue "True"}}{{else}}{{name}},{{/stringcompare}}{{/each}}{{/each}}{{/each}}
4040
{{../metadataConfiguration.recordSourceAttribute}}
4141
{{#unless @last}}UNION{{/unless}}
4242
{{/each}}

Virtual_EDW/LoadPatterns/loadPatternLinkView.Handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ FROM
4747
{{/each}}
4848
{{#if filterCriterion}}AND {{filterCriterion}}{{/if}}
4949
GROUP BY
50-
{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#each sourceDataItems}}{{#stringdiff isHardCodedValue "True"}}{{name}},{{/stringdiff}}{{/each}}{{/each}}{{/each}}{{#each dataItemMappings}}[{{sourceDataItems.0.name}}],{{/each}}
50+
{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#each sourceDataItems}}{{#stringcompare isHardCodedValue "True"}}{{else}}{{name}},{{/stringcompare}}{{/each}}{{/each}}{{/each}}{{#each dataItemMappings}}[{{sourceDataItems.0.name}}],{{/each}}
5151
{{../metadataConfiguration.recordSourceAttribute}}{{#unless @last}}UNION{{/unless}}
5252
) LINK_selection
5353
GROUP BY {{#each businessKeys}} {{#unless @first}} {{#each businessKeyComponentMapping}}

Virtual_EDW/LoadPatterns/loadPatternLinkViewNoHash.Handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ FROM
4747
{{/each}}
4848
{{#if filterCriterion}}AND {{filterCriterion}}{{/if}}
4949
GROUP BY
50-
{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#each sourceDataItems}}{{#stringdiff isHardCodedValue "True"}}{{name}},{{/stringdiff}}{{/each}}{{/each}}{{/each}}{{#each dataItemMappings}}[{{sourceDataItems.0.name}}],{{/each}}
50+
{{#each businessKeys}}{{#each businessKeyComponentMapping}}{{#each sourceDataItems}}{{#stringcompare isHardCodedValue "True"}}{{else}}{{name}},{{/stringcompare}}{{/each}}{{/each}}{{/each}}{{#each dataItemMappings}}[{{sourceDataItems.0.name}}],{{/each}}
5151
{{../metadataConfiguration.recordSourceAttribute}}{{#unless @last}}UNION{{/unless}}
5252
) LINK_selection
5353
GROUP BY {{#each businessKeys}} {{#unless @first}} {{#each businessKeyComponentMapping}}

Virtual_EDW/LoadPatterns/loadPatternStagingTestData.Handlebars

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
-- Test data generation for: {{targetDataObject.name}}
44
-- Generated at {{now}}
55
--
6-
{{replicate 2}}
7-
INSERT INTO [{{targetDataObject.dataObjectConnection.extensions.0.value}}].[{{targetDataObject.dataObjectConnection.extensions.1.value}}].[{{targetDataObject.name}}]
6+
{{#replicate 5}}
7+
INSERT INTO [{{../targetDataObject.dataObjectConnection.extensions.0.value}}].[{{../targetDataObject.dataObjectConnection.extensions.1.value}}].[{{../targetDataObject.name}}]
88
(
99
[{{../../metadataConfiguration.etlProcessAttribute}}],
1010
[{{../../metadataConfiguration.eventDateTimeAttribute}}],
@@ -22,9 +22,10 @@ VALUES
2222
'Test Cases',
2323
'Insert',
2424
0x00000000000000000000000000000000,
25-
{{#each dataItemMappings}}
26-
{{stringcompare sourceDataItems.0.dataType "int"}}{{randomnumber 100000}}{{/stringcompare}}{{stringcompare sourceDataItems.0.dataType "varchar"}}'{{randomstring 10}}'{{/stringcompare}}{{stringcompare sourceDataItems.0.dataType "date"}}'{{randomdate 2000}}'{{/stringcompare}}{{#unless @last}},{{/unless}}
25+
{{#each ../dataItemMappings}}
26+
{{#stringcompare sourceDataItems.0.dataType "int"}}{{randomnumber 100000}}{{/stringcompare}}{{#stringcompare sourceDataItems.0.dataType "varchar"}}'{{randomstring 10}}'{{/stringcompare}}{{#stringcompare sourceDataItems.0.dataType "date"}}'{{randomdate 2000}}'{{/stringcompare}}{{#unless @last}},{{/unless}}
2727
{{/each}}
2828
)
2929
{{/replicate}}
30+
3031
{{/each}}

Virtual_EDW/Virtual_Data_Warehouse.csproj

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
</ItemGroup>
113113
<ItemGroup>
114114
<Compile Include="ExtensionMethods.cs" />
115-
<Compile Include="HandlebarsHelpers.cs" />
116115
<Compile Include="InterfaceObjectModel.cs" />
117116
<Compile Include="VdwUtility.cs" />
118117
<Compile Include="CustomTabPage.cs" />
@@ -416,23 +415,23 @@
416415
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
417416
</ItemGroup>
418417
<ItemGroup>
419-
<PackageReference Include="Handlebars.Net.1.8.0.Signed">
420-
<Version>1.8.0</Version>
418+
<PackageReference Include="Handlebars.Net">
419+
<Version>2.0.7</Version>
421420
</PackageReference>
422421
<PackageReference Include="Microsoft.Data.SqlClient">
423-
<Version>2.1.0</Version>
422+
<Version>2.1.2</Version>
424423
</PackageReference>
425424
<PackageReference Include="Microsoft.Identity.Client">
426-
<Version>4.23.0</Version>
425+
<Version>4.30.1</Version>
427426
</PackageReference>
428427
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects">
429-
<Version>161.44091.28</Version>
428+
<Version>161.46367.54</Version>
430429
</PackageReference>
431430
<PackageReference Include="Newtonsoft.Json">
432-
<Version>12.0.3</Version>
431+
<Version>13.0.1</Version>
433432
</PackageReference>
434433
<PackageReference Include="Newtonsoft.Json.Schema">
435-
<Version>3.0.13</Version>
434+
<Version>3.0.14</Version>
436435
</PackageReference>
437436
</ItemGroup>
438437
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

0 commit comments

Comments
 (0)