Data privacy
privacy mask <json_rows> <json_rules>
Description
Mask fields with rules: drop, null, hash, email (j***@mail.fr), initials, keep:start:end, truncate:n, range:width (47 -> 40-49), year, month
Mask fields with rules: drop, null, hash, email (j***@mail.fr), initials, keep:start:end, truncate:n, range:width (47 -> 40-49), year, month
Parameters
json_rows: The rows - String - required
json_rules: {"field": "rule"} - String - required
json_rows: The rows - String - required
json_rules: {"field": "rule"} - String - required
admin
privacy mask "[{\"name\": \"Jean Dupont\", \"email\": \"jean.dupont@mail.fr\", \"age\": 47, \"zip\": \"75011\", \"card\": \"4970101234567890\", \"visit\": \"2026-03-14\"}, {\"name\": \"Marie Martin\", \"email\": \"marie@lab.org\", \"age\": 33, \"zip\": \"69003\", \"card\": \"5130111122223333\", \"visit\": \"2026-05-02\"}]" "{\"name\": \"initials\", \"email\": \"email\", \"age\": \"range:10\", \"zip\": \"truncate:2\", \"card\": \"keep:0:4\", \"visit\": \"month\"}"
mentdb
[{"name": "J.D.", "email": "j***@mail.fr", "age": "40-49", "zip": "75", "card": "************7890", "visit": "2026-03"}, {"name": "M.M.", "email": "m***@lab.org", "age": "30-39", "zip": "69", "card": "************3333", "visit": "2026-05"}]
privacy mask <json_rows> <json_rules> <secret>
Description
Mask with a secret for the hash rule (the same value gives the same hash)
Mask with a secret for the hash rule (the same value gives the same hash)
Parameters
json_rows: The rows - String - required
json_rules: The rules - String - required
secret: The secret - String - required
json_rows: The rows - String - required
json_rules: The rules - String - required
secret: The secret - String - required
admin
privacy mask "[{\"name\": \"Jean Dupont\", \"email\": \"jean.dupont@mail.fr\", \"age\": 47, \"zip\": \"75011\", \"card\": \"4970101234567890\", \"visit\": \"2026-03-14\"}, {\"name\": \"Marie Martin\", \"email\": \"marie@lab.org\", \"age\": 33, \"zip\": \"69003\", \"card\": \"5130111122223333\", \"visit\": \"2026-05-02\"}]" "{\"name\": \"hash\", \"email\": \"drop\", \"card\": \"null\"}" "my-secret-2026"
mentdb
[{"name": "dbf1e1ed57812fd2", "age": 47, "zip": "75011", "card": null, "visit": "2026-03-14"}, {"name": "4b6900e34b7d49ed", "age": 33, "zip": "69003", "card": null, "visit": "2026-05-02"}]
privacy pseudonymize <json_rows> <json_fields> <secret>
Description
Replace the values of some fields by a token (HMAC-SHA256 with a secret of 8 characters or more): the same value always gives the same token, so the tables can still be joined
Replace the values of some fields by a token (HMAC-SHA256 with a secret of 8 characters or more): the same value always gives the same token, so the tables can still be joined
Parameters
json_rows: The rows - String - required
json_fields: The fields - String - required
secret: The secret - String - required
json_rows: The rows - String - required
json_fields: The fields - String - required
secret: The secret - String - required
admin
privacy pseudonymize "[{\"name\": \"Jean Dupont\", \"email\": \"jean.dupont@mail.fr\", \"age\": 47, \"zip\": \"75011\", \"card\": \"4970101234567890\", \"visit\": \"2026-03-14\"}, {\"name\": \"Marie Martin\", \"email\": \"marie@lab.org\", \"age\": 33, \"zip\": \"69003\", \"card\": \"5130111122223333\", \"visit\": \"2026-05-02\"}]" "[\"name\", \"email\"]" "my-secret-2026"
mentdb
[{"name": "dbf1e1ed57812fd2", "email": "96f8b6b7f3b25ba2", "age": 47, "zip": "75011", "card": "4970101234567890", "visit": "2026-03-14"}, {"name": "4b6900e34b7d49ed", "email": "0f9e5c8f93e01ba4", "age": 33, "zip": "69003", "card": "5130111122223333", "visit": "2026-05-02"}]
privacy k_anonymity <json_rows> <json_quasi_identifiers> <k>
Description
k-anonymity: the size of the smallest group of rows with the same quasi-identifiers (age, zip code, sex...), the groups and the rows below k
k-anonymity: the size of the smallest group of rows with the same quasi-identifiers (age, zip code, sex...), the groups and the rows below k
Parameters
json_rows: The rows - String - required
json_quasi_identifiers: The quasi-identifiers - String - required
k: The required k - Number - required
json_rows: The rows - String - required
json_quasi_identifiers: The quasi-identifiers - String - required
k: The required k - Number - required
admin
privacy k_anonymity "[{\"age\": \"40-49\", \"zip\": \"750\", \"sex\": \"M\"}, {\"age\": \"40-49\", \"zip\": \"750\", \"sex\": \"M\"}, {\"age\": \"30-39\", \"zip\": \"690\", \"sex\": \"F\"}, {\"age\": \"30-39\", \"zip\": \"690\", \"sex\": \"F\"}, {\"age\": \"30-39\", \"zip\": \"690\", \"sex\": \"F\"}, {\"age\": \"50-59\", \"zip\": \"060\", \"sex\": \"M\"}]" "[\"age\", \"zip\", \"sex\"]" 2
mentdb
{"k": 1, "groups": 3, "k_anonymous": false, "rows_at_risk": 1, "groups_below_k": [{"age": "50-59", "zip": "060", "sex": "M", "count": 1}]}
