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 · MASK08 37 30 90 45 (fr) · (369) 107-2808 (en)+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.*.*
DATEFAKE1987-11-02—
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.

The dataset holds about 5,000 first names: on a UNIQUE column, the fake carries a uniqueness suffix (Darrell.9f3ac21b04e7d5a6). Same for ADDRESS. See UNIQUE columns and collisions.

Generates a phone number in the format of the configured locale. The first digit comes from Datafaker, every other digit is drawn from the HMAC seed — deterministic, and about 81 (en) to 474 (fr) collisions per million values. 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).

With FAKE, draws a deterministic date — by default a plausible adult birth date between 1935 and 2008. Override the range per column with min_year (inclusive) and max_year (exclusive), both in [1900, 2100]. Works on date and timestamp columns. Refused on a UNIQUE column. To perturb a real date instead of replacing it, use the DATE_SHIFT strategy.

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.