๐ Obfuscate Transformer โ
The Obfuscate transformer is used to obfuscate or mask string values by replacing characters with a specified symbol.
๐ Alternation โ
This transformer mutates the existing row value by partially replacing characters.
โ Valid Data Types โ
String
โ๏ธ Options โ
| Option | Type | Description | Default |
|---|---|---|---|
symbol | String | The character to use for obfuscation. | * |
start-at | Integer | The 0-based index where obfuscation starts. | 3 |
stop-at | Integer | The 0-based index where obfuscation stops. | None (to end of string) |
๐งช Examples โ
Example 1: Default behavior โ
toml
[[table.columns]]
name = "column-example"
transformer = "obfuscate"Input: "Obfuscation example"
Output: "Obf****************"Example 2: Specifying symbol โ
toml
[[table.columns]]
name = "column-example"
transformer = { obfuscate = { symbol = "?" } }Input: "Obfuscation example"
Output: "Obf????????????????"Example 3: Specifying start-at โ
toml
[[table.columns]]
name = "column-example"
transformer = { obfuscate = { start-at = 10 } }Input: "Obfuscation example"
Output: "Obfuscatio*********"Example 4: Specifying stop-at โ
toml
[[table.columns]]
name = "column-example"
transformer = { obfuscate = { stop-at = 10 } }Input: "Obfuscation example"
Output: "Obf*******n example"Example 5: Specifying all options โ
toml
[[table.columns]]
name = "column-example"
transformer = { obfuscate = { start-at = 15, stop-at = 26, symbol = "~" } }Input: "Only obfuscate transformer text"
Output: "Only obfuscate ~~~~~~~~~~~ text"๐ช Alias Support โ
You can also use the alias redact:
toml
[[table.columns]]
name = "column-example"
transformer = "redact"