Skip to content

Commit 4e31b3a

Browse files
committed
Update Program.cs
1 parent c6b86ce commit 4e31b3a

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

DataWarehouseAutomation/Export/Program.cs

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
using System.Dynamic;
2-
using DataWarehouseAutomation;
3-
using HandlebarsDotNet;
4-
using Newtonsoft.Json;
1+
using Newtonsoft.Json;
2+
using System;
53

6-
var inputMetadataDirectory = @"D:\Git_Repos\jarvis-TEAM-metadata\Development\TEAM\Metadata";
4+
var inputMetadataDirectory = @"D:\Git_Repos\Projects\jarvis-TEAM-metadata\Development\TEAM\Metadata";
75
var outputMetadataDirectory = @"D:\Git_Repos\";
86

97
var exceptionList = new List<string>
@@ -56,18 +54,30 @@
5654
Console.WriteLine($"Issue: "+exception.Message);
5755
}
5856
}
57+
else
58+
{
59+
Console.WriteLine($"Skipping " + Path.GetFileName(file));
60+
}
5961
}
6062

61-
// Export to file
63+
// Export to file.
6264
using (StreamWriter writer = new StreamWriter(outputMetadataDirectory+"TEAM-export.csv"))
6365
{
6466
foreach (var exportRow in exportOutput)
6567
{
66-
writer.WriteLine($"{exportRow.SourceDataObject},{exportRow.SourceDataItem},{exportRow.TargetDataObject},{exportRow.TargetDataItem}");
68+
try
69+
{
70+
writer.WriteLine($"{exportRow.SourceDataObject},{exportRow.SourceDataItem},{exportRow.TargetDataObject},{exportRow.TargetDataItem}");
71+
}
72+
catch (Exception exception)
73+
{
74+
Console.WriteLine($"Issue: " + exception.Message);
75+
}
6776
}
6877
}
6978

7079
// Finish the application.
80+
Console.WriteLine($"Done, press any key to exit");
7181
Console.ReadKey();
7282

7383
internal class DataItemMappingTuple

0 commit comments

Comments
 (0)