Skip to content

Data anonymisation

The data-anonymize component applies column-level anonymisation rules to a target table. Use cases: producing a non-production data copy for development or for sharing with third parties without leaking customer data.

REST endpoint

POST /services/data/anonymize
{
    "dataSource": "DefaultDB",
    "schema": "PUBLIC",
    "table": "CUSTOMER",
    "rules": [
        { "column": "EMAIL",    "strategy": "hash" },
        { "column": "PHONE",    "strategy": "mask",     "options": { "keepLast": 4 } },
        { "column": "NAME",     "strategy": "fake",     "options": { "category": "name" } },
        { "column": "BIRTHDAY", "strategy": "shift",    "options": { "days": 30 } }
    ]
}

Strategies

StrategyEffect
hashOne-way SHA-256 of the value.
maskReplace all but a tail / head substring with *.
fakeReplace with a generated value from a faker category (name, email, address, ...).
shiftShift a date / number by a deterministic offset.
nullReplace with NULL.

Determinism

The hash and shift strategies are deterministic per-record, so foreign-key relationships survive the anonymisation. The fake strategy can be seeded with a salt to keep results stable across runs.

See also

Released under the EPL-2.0 License.