Skip to content

Operators

Operators control the replacement value for each detected entity. They do not change which entities are detected; they define what appears in the de-identified output after detection runs.

Configure operators per entity type with entity_config. Set DEFAULT to choose the fallback operator for entity types that do not have their own rule.

OperatorBest for
type_numberedDefault readable placeholders such as [PERSON_1]
constantOne fixed replacement string
maskPartial character masking
hashDeterministic, non-reversible replacements
fakerSynthetic realistic values
encryptReversible encrypted replacements
keepDetect and ledger without changing text
entity_typeType labels without counters
date_shiftCalendar-date shifting with intervals preserved

Use the operator that matches the output you need:

NeedOperator
Readable output that still distinguishes entitiestype_numbered
A simple redacted string for every replacementconstant
Partial visibility, such as preserving the last four digitsmask
Deterministic joins without displaying the original valuehash
Realistic-looking synthetic valuesfaker
Reversible de-identification for controlled workflowsencrypt
Detection results without changing the source textkeep
Compact labels such as [PERSON]entity_type
Shift dates while preserving intervals between datesdate_shift
OBJECT_CONSTRUCT(
'entity_config', OBJECT_CONSTRUCT(
'DEFAULT', OBJECT_CONSTRUCT('operator', 'type_numbered'),
'PHONE_NUMBER', OBJECT_CONSTRUCT('operator', 'mask'),
'DATE_TIME', OBJECT_CONSTRUCT(
'operator', 'date_shift',
'operator_params', OBJECT_CONSTRUCT('offset_days', 137)
)
)
)

Self-hosted HTTP requests use the same structure as JSON object fields.

  • Operators apply only to entities Agent Mask detects in the input.
  • Entity-specific rules take precedence over DEFAULT.
  • Put operator-specific settings inside operator_params.