Skip to main content
Trajectory SDK supports pluggable PII redaction via transforms. Transforms run after trajectory building — your raw data never touches disk unredacted.

Using a Transform

Pass transforms to tj.init():
This works with both standard and bulk imports.

Writing a Custom Transform

Custom PII transforms extend BasePiiTransform and implement two methods:
  • transform(trajectory) — return a new trajectory with PII removed
  • preview(trajectories) — dry-run that reports what would be redacted

Preview Before Redacting

Use preview() to check what a transform would catch without modifying any data:

Built-in Rules

RegexPiiTransform supports the following PiiRule values: