Skip to content
Quickstart

Semantic types

A type declares the semantics of a column so Brume knows what kind of value to generate. Types apply only to the FAKE and MASK strategies — other strategies don’t need them.

TypeStrategyExample output (FAKE)Example output (MASK)
EMAILFAKEalice.smith@example.coma***@e***.com
FIRST_NAMEFAKEAliceA****
LAST_NAMEFAKEDupontD*****
PHONEFAKE · MASK+33 6 12 34 56 78+33 6 ** ** ** 78
ADDRESSFAKE · MASK12 rue de la Paix, 75002 Paris** rue ************, 75002 Paris
IBANFAKE · MASKFR76 3000 6000 0112 3456 7890 189FR76 **** **** **** **** **** 189
IP_ADDRESSFAKE · MASK192.168.1.42192.168.*.*
JSONBFAKE(delegated to json_paths)

Generates a syntactically valid email using a fake first name + last name + a safe demonstration TLD. Stable across runs for the same input + secret.

Picks from the Datafaker dataset matching the system locale, seeded by HMAC. To get cross-table consistency (the same real person → the same fake first name in users and payments), declare a linked_columns entry.

Generates a phone number in the locale format. MASK keeps the international prefix and the last digits, replaces the middle.

Generates a street, postal code, city. MASK keeps the postal code and city, masks the street number and name.

Generates a syntactically valid IBAN (correct country code and check digits). MASK keeps the country / check / last block, masks the rest.

Generates an IPv4 address. MASK keeps the first two octets (network), masks the last two (host).

Special type: indicates that the column is a JSONB document and Brume should delegate to the json_paths declaration to anonymize specific fields inside the document. See the JSONB recipe.

Pick the type that matches the column semantics, not its Postgres type. A VARCHAR(255) storing IBANs needs type: IBAN, not “any string”.

If your column doesn’t fit any semantic type but you still want a deterministic fake string, prefer HASH — it gives you a stable opaque value without trying to mimic a real format.