PhiSQL Specification¶
PhiSQL is the declarative query language for PII privacy operations across the Philterd toolkit. This site is the canonical, versioned reference for the PhiSQL specification.
A PhiSQL document is a sequence of statements that compile to a Phileas redaction policy:
How this site is built¶
The spec is a set of machine-readable artifacts — the grammar, the catalog YAML files, and the worked examples. There is no separate prose spec document; the artifacts are the spec. Every page under Reference and Examples is generated directly from those artifacts, so the published reference cannot drift from the catalogs it describes.
Where to start¶
- Grammar — the full EBNF and production rules.
- Verbs — the statements:
REDACT,DEIDENTIFY,IGNORE,DEFINE,DETECT, and the discovery verbs. - Clauses —
WITH,WHERE,OPTIONS,IN,GROUP BY,LIMIT. - Type system — entity types, strategies, predicates, and literal value types.
- Examples — every worked example, paired with the policy JSON it compiles to.
Status¶
PhiSQL v1.0 is stable. The grammar and semantics of the v1.0 surface are frozen. Subsequent changes follow the versioning policy: additive features land in minor versions, breaking changes require a new major version. Use the version selector in the header to view other releases of this spec.
Repository¶
The spec, reference implementation, and these docs live in philterd/phisql. Feedback is welcome via GitHub issues.