entity_type
entity_type replaces each entity with just its type label — no counter. All entities of the same type get the same placeholder.
[PERSON], [PERSON], [EMAIL_ADDRESS], [US_SSN]Compare with type_numbered which produces [PERSON_1], [PERSON_2], etc.
Parameters
Section titled “Parameters”None.
Example
Section titled “Example”SELECT app_public.mask( 'John Smith emailed jane@acme.com. Later, Michael Lee called.', OBJECT_CONSTRUCT( 'entity_config', OBJECT_CONSTRUCT( 'DEFAULT', OBJECT_CONSTRUCT('operator', 'entity_type') ) ));-- [PERSON] emailed [EMAIL_ADDRESS]. Later, [PERSON] called.When to use
Section titled “When to use”- Output is a human-readable report where multiple instances don’t need to be distinguished.
- You want compact placeholders without per-entity numbering in the rendered text.
- You need simple, consistent redaction output for review workflows.
- The entity type name in the placeholder matches the detected
entity_typeexactly. Custom entities use their configured name: aMEDICATIONcustom entity becomes[MEDICATION]. - The rendered
deidentified_textstill shows one placeholder per replacement, so readers may be able to count visible mentions.entity_typeremoves per-entity identity labels; it does not hide the number of replacement occurrences. - Entity detections are still tracked in
analyzer_resultsandentity_ledger.
See also
Section titled “See also”- type_numbered — default, adds per-type counter.
- constant — single fixed string regardless of type.