Skip to content

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.

None.

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.
  • 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_type exactly. Custom entities use their configured name: a MEDICATION custom entity becomes [MEDICATION].
  • The rendered deidentified_text still shows one placeholder per replacement, so readers may be able to count visible mentions. entity_type removes per-entity identity labels; it does not hide the number of replacement occurrences.
  • Entity detections are still tracked in analyzer_results and entity_ledger.