Skip to content

Commit

Permalink
update markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
JFriel committed Oct 28, 2024
1 parent 2e2c5a9 commit 97bf0d4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
9 changes: 6 additions & 3 deletions Documentation/DataLoadEngine/RegexRedactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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)
Original file line number Diff line number Diff line change
Expand Up @@ -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<ColumnInfo> columns, int? readLimit = null)
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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;
}
}
}

0 comments on commit 97bf0d4

Please sign in to comment.