Skip to content

Commit

Permalink
fix misplased bracket
Browse files Browse the repository at this point in the history
  • Loading branch information
JFriel committed Oct 27, 2023
1 parent 5d42d4a commit 62ba406
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions HICPlugin/DataFlowComponents/CHIColumnFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,14 @@ public DataTable ProcessPipelineData(DataTable toProcess, IDataLoadEventListener
}
string fileLocation = null;
if (!string.IsNullOrWhiteSpace(OutputFileDirectory))
{
if (!Directory.Exists(OutputFileDirectory))
{
Directory.CreateDirectory(OutputFileDirectory);
}
{

fileLocation = System.IO.Path.Combine(OutputFileDirectory, toProcess.TableName.ToString() + "_Potential_CHI_Locations.csv").ToString();
if (File.Exists(fileLocation) && BailOutEarly)
if (File.Exists(fileLocation) && BailOutEarly is true)
{
var lineCount = File.ReadLines(fileLocation).Count();
if (lineCount > 20)
Expand Down Expand Up @@ -440,18 +441,18 @@ public void PreInitialize(IExtractCommand value, IDataLoadEventListener listener

if (!hashOnReleaseColumns.Any() && String.IsNullOrWhiteSpace(AllowListFile)) return;

if (hashOnReleaseColumns.Length >0)
if (hashOnReleaseColumns.Length > 0)
{
listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Information,
$"Ignoring the following columns as they have been hashed on release: {string.Join(", ", hashOnReleaseColumns)}"));
}

if (File.Exists(AllowListFile) && AllowLists.Count ==0)
if (File.Exists(AllowListFile) && AllowLists.Count == 0)
{
string allowListFileContent = File.ReadAllText(AllowListFile);
var deserializer = new DeserializerBuilder().Build();
var yamlObject = deserializer.Deserialize<Dictionary<Object,Object>>(allowListFileContent);
foreach ( var kvp in yamlObject )
var yamlObject = deserializer.Deserialize<Dictionary<Object, Object>>(allowListFileContent);
foreach (var kvp in yamlObject)
{
string catalogue = kvp.Key.ToString();
List<string> columns = new();
Expand All @@ -464,15 +465,15 @@ public void PreInitialize(IExtractCommand value, IDataLoadEventListener listener
}
if (hashOnReleaseColumns.Any())
{
bool exists = AllowLists.TryGetValue("RDMP_ALL",out var allowAllList);
if(exists)
bool exists = AllowLists.TryGetValue("RDMP_ALL", out var allowAllList);
if (exists)
{
allowAllList.AddRange(hashOnReleaseColumns);
AllowLists["RDMP_ALL"] = allowAllList;
}
else
{
AllowLists.Add("RDMP_ALL",hashOnReleaseColumns.ToList());
AllowLists.Add("RDMP_ALL", hashOnReleaseColumns.ToList());
}
}
}
Expand Down

0 comments on commit 62ba406

Please sign in to comment.