๐ง Email Transformer โ
The Email transformer generates randomized or masked email addresses. You can control the local part, the domain, or both. Domains can be set either as a full string or as an object that defines individual domain parts.
๐ Alternation โ
This transformer does not mutate the existing row value โ it generates a new value.
โ Valid Data Types โ
String
โ๏ธ Options โ
| Option | Type | Description | Default |
|---|---|---|---|
domain | String or Object | Full domain string, or an object with optional second-level-domain and top-level-domain | Random hash |
local-part | String | Override the local part (e.g. user in user@domain) | Random hash |
๐ง Domain Object Format โ
When using the object format, you can override just part of the domain:
toml
transformer = { email = { domain = { top-level-domain = "xyz", second-level-domain = "skifta" } } }Both fields are optional.
๐งช Examples โ
Example 1: Default behavior โ
Generates a random email address using hashed values for both parts.
toml
[[table.columns]]
name = "email"
transformer = "email"Input: "[email protected]"
Output: "[email protected]"Example 2: Specifying both domain and local-part as strings โ
toml
[[table.columns]]
name = "email"
transformer = { email = { domain = "email.skifta.dev", local-part = "info" } }Input: "[email protected]"
Output: "[email protected]"Example 3: Specifying only domain as string โ
toml
[[table.columns]]
name = "email"
transformer = { email = { domain = "skifta.dev" } }Input: "[email protected]"
Output: "[email protected]"Example 4: Specifying only local-part โ
toml
[[table.columns]]
name = "email"
transformer = { email = { local-part = "skifta" } }Input: "[email protected]"
Output: "[email protected]"Example 5: Domain with only top-level-domain โ
toml
[[table.columns]]
name = "email"
transformer = { email = { domain = { top-level-domain = "dev" } } }Input: "[email protected]"
Output: "[email protected]"Example 6: Domain with only second-level-domain โ
toml
[[table.columns]]
name = "email"
transformer = { email = { domain = { second-level-domain = "skifta" } } }Input: "[email protected]"
Output: "[email protected]"Example 7: Domain with both second-level and top-level โ
toml
[[table.columns]]
name = "email"
transformer = { email = { domain = { second-level-domain = "skifta", top-level-domain = "dev" } } }Input: "[email protected]"
Output: "[email protected]"