diff --git a/Documentation/DataLoadEngine/RegexRedactions.md b/Documentation/DataLoadEngine/RegexRedactions.md index c1c5a9065e..b794db81ca 100644 --- a/Documentation/DataLoadEngine/RegexRedactions.md +++ b/Documentation/DataLoadEngine/RegexRedactions.md @@ -34,8 +34,11 @@ To view the redactions made, see the section below. ## Usage within RDMP You can view and restore existing redactions, along with adding new redactions within RDMP. -For a Catalogue, right-click and iopen the "Catalogue Items" submenu. +For a Catalogue, right-click and open the "Catalogue Items" submenu. From here, select the "Regex Redactions" option. This will open an interface displaying existing redactions. -From here you casn restore existing redactions either individually or in bulk. -Yuo can also apply regex redactions to existing data by selecting a redaction configuration and which columns to redact. \ No newline at end of file +From here you can restore existing redactions either individually or in bulk. +You can also apply regex redactions to existing data by selecting a redaction configuration and which columns to redact. + + +[Catalogue](../CodeTutorials/Glossary.md#Catalogue) diff --git a/Rdmp.Core/CommandExecution/AtomicCommands/ExecuteCommandPerformRegexRedactionOnCatalogue.cs b/Rdmp.Core/CommandExecution/AtomicCommands/ExecuteCommandPerformRegexRedactionOnCatalogue.cs index c5bb0cb846..8138383cb2 100644 --- a/Rdmp.Core/CommandExecution/AtomicCommands/ExecuteCommandPerformRegexRedactionOnCatalogue.cs +++ b/Rdmp.Core/CommandExecution/AtomicCommands/ExecuteCommandPerformRegexRedactionOnCatalogue.cs @@ -33,7 +33,7 @@ public class ExecuteCommandPerformRegexRedactionOnCatalogue : BasicCommandExecut private DataTable redactionsToSaveTable; private DataTable pksToSave; private readonly int? _readLimit; - private DataTable redactionUpates = new(); + private DataTable redactionUpdates = new(); public int resultCount = 0; public ExecuteCommandPerformRegexRedactionOnCatalogue(IBasicActivateItems activator, ICatalogue catalogue, RegexRedactionConfiguration redactionConfiguration, List columns, int? readLimit = null) @@ -97,13 +97,13 @@ public override void Execute() } conn.Close(); - redactionUpates = dt.Clone(); - redactionUpates.BeginLoadData(); + redactionUpdates = dt.Clone(); + redactionUpdates.BeginLoadData(); foreach (DataRow row in dt.Rows) { - RegexRedactionHelper.Redact(columnInfo, row, _cataloguePKs, _redactionConfiguration, redactionsToSaveTable, pksToSave, redactionUpates); + RegexRedactionHelper.Redact(columnInfo, row, _cataloguePKs, _redactionConfiguration, redactionsToSaveTable, pksToSave, redactionUpdates); } - redactionUpates.EndLoadData(); + redactionUpdates.EndLoadData(); if(pksToSave.Rows.Count == 0) { _activator.Show("Unable to find any matching Redactions"); @@ -131,14 +131,14 @@ public override void Execute() t2.Drop(); if (dt.Rows.Count > 0) { - RegexRedactionHelper.DoJoinUpdate(columnInfo, _discoveredTable, _server, redactionUpates, _discoveredPKColumns); + RegexRedactionHelper.DoJoinUpdate(columnInfo, _discoveredTable, _server, redactionUpdates, _discoveredPKColumns); } } else { throw new Exception($"Unable to identify any primary keys in table '{table}'. Redactions cannot be performed on tables without primary keys"); } - resultCount += redactionUpates.Rows.Count; + resultCount += redactionUpdates.Rows.Count; } } }