Skip to main content

Dynamic Data MaskingSensitive columns, masked at query time.

Dynamic data masking transforms sensitive values as they're read — full value for one role, hashed for another, last-four for a third. The data at rest never changes; only the SELECT result does.

Dynamic data masking architecture

Transformed at read. Unchanged at rest.

Query-time transform

Masking rewrites the value in the result set as the query runs. Storage is untouched — there's no masked copy to maintain and no second source of truth. The same row returns different values to different callers.

Role-based policy

What each caller sees is a policy decision, not a column property. Rules bind to role, environment, project, table, column, or classification — so one column can return cleartext to a fraud investigator, last-four to support, and a hash to an analyst.

Dynamic data masking in Bytebase

Masked at query, for every engine.

Bytebase sits in front of the database and applies masking at query time. Rules are written as CEL conditions on environment, project, table, column, or classification, and resolve against the requester's role — so the same column returns different values to different people, with one policy and one audit trail across every engine.

One policy. Every engine.

Dynamic data masking questions

Common questions.

What is dynamic data masking?
Dynamic data masking (DDM) transforms sensitive column values as a query is answered, based on who's asking. The stored data is never altered — the same SELECT returns the real value to one role and a masked value (hashed, redacted, last-four) to another. It's the result-set control layer: who can connect is access control; what they actually see is masking.
How is it different from static data masking?
Static masking writes masked values into a separate copy of the data — useful for non-production datasets, but it's a second source of truth you have to refresh and keep in sync. Dynamic masking leaves the production data untouched and transforms values at query time, so there's no copy to maintain and the same row can return different values to different callers.
How does this differ from row-level security (RLS)?
RLS hides whole rows based on a policy. Masking transforms specific column values without hiding the row. Postgres, SQL Server, and Oracle support RLS natively, but engine-native RLS comes with performance footguns and bypass risks. A workflow gateway sits in front of the database and applies masking policies that work the same way across engines, with a centralized audit trail.

Explore the standard for database development