SQL Flow · Continuous data masking

Share production data. Choose what each replica reveals.

Your analysts need to know that two orders belong to the same customer. Your support team may need the last four digits of a phone number. SQL Flow masks sensitive fields as it writes each destination, from the first copy through every subsequent change.

Example replicas

One source. Two views of a customer.

Choose the example replica
Example field values in production and the analytics replica
FieldProductionAnalytics
Customers customer_idC-104829e7a…2c81
Orders customer_idC-104829e7a…2c81
Customers phone2025550148Excluded
Orders amount149.95149.95

Analysts can total each customer’s orders. Both tables carry the same token, shown shortened here, and the phone column is absent.

Keep the joins your reports depend on.

Replace a customer ID with a different value in every row and a lifetime-value report falls apart. SQL Flow can give that customer the same pseudonym in Customers and Orders. An analyst can still join the tables, count repeat purchases and sum spend per customer.

How the match survives

The agent generates a 64-character HMAC-SHA256 token using a secret you control. Use the same key, version and normalization for fields that need to join. Use separate secrets for datasets that should produce different tokens.

On supported key-masking routes, SQL Flow checks the parent and child rules together. A change that would break their relationship blocks activation.

Check key and target requirements →

Give each field a purpose on the replica.

Keep an original valueOrder amount
Keep the actual amount for revenue reports. An explicit Keep decision distinguishes a field someone approved from one still awaiting review.
Use a stable pseudonymCustomer identifier
Generate the same keyed token wherever the same identifier must match. For ordinary email fields, trim spaces and normalize case before hashing if different spellings should count as one address.
Reveal part of a valueContact number
Choose how many characters to show at either end and how many must stay hidden. A short value is masked in full. On SQL Server sources, a fixed run of mask characters can also conceal the original length.
Replace the valueDate of birth
Supply a neutral value when a downstream application expects the field to exist. Use a typed replacement for supported dates, numbers, text or booleans. Choose whether a missing value stays NULL.
Exclude the columnCase notes
Leave free-text notes out of the replicated output entirely. The reporting team still gets the ticket number, timestamps and resolution code.

When two systems spell an email differently

A billing address stored as Ada@Example.com can match the same address stored as ada@example.com in orders. This expression trims spaces and normalizes case before the agent generates the token.

HASH_MASK(LOWER(TRIM(email)), 'customer_contact') See masking expressions and worked examples →

Find the fields that still need a decision.

Email addresses often turn up in billing contacts, account owners and delivery instructions. Read the source schema once, then review coverage across the tables each target actually receives.

Start with repeated names

Review name-based suggestions in bulk, or write a pattern such as *email* and narrow it by table or data type. See how many fields it matches. An explicit field decision wins, and patterns skip key columns.

Make sensitive fields mandatory

A masking administrator can require protection for a field, specify allowed actions and cap how many characters may be revealed. SQL Flow checks what the target would actually receive, including manually configured expressions. An unmet requirement blocks the start or rule change and names the field.

Review without opening customer records

The editor illustrates each action with synthetic values. Reviewers can see the effect of a mask, filter to unreviewed fields and distinguish an approved original value from an overlooked field.

Change a policy without surprising every team that uses it.

Publish a rule set for a source database and pin each target to a revision. The analytics team can adopt the next revision while the support team reviews how it affects its own exceptions. To reuse reviewed rules in another environment, export and import the rule set as JSON.

  1. Review the difference

    See which field decisions change on this target. Where a new rule touches a local override, choose whether to keep the exception or inherit the update. Revealing a previously masked field requires explicit acknowledgment.

  2. Know what will reload

    A revision with identical effective rules can be recorded without copying data again. For eligible changes, SQL Flow lists the affected tables on that target. If all tables and targets need a reload, you see that before activation.

  3. Trace what went live

    See which targets use each revision. The activity history records who published a revision, who activated it, and whether it was applied or refused. The history contains decisions and metadata only.

Follow a rule set from draft to activation →

Where the originals travel

Set the rules before the first load to protect both existing rows and incoming changes. SQL Flow applies masking when the agent writes the target. The capture spool and any relay can carry original values, so those hosts and their storage belong inside your trusted environment.

Pseudonym keys stay on your agents. The control plane stores a key version and a secret reference. Rotating that key changes the tokens, which matters if downstream extracts still join on the old ones.

Where you can use masking

Rule sets support one-way replication from SQL Server DirectLog or Reconstruction, or Oracle DirectLog, into SQL Server, Azure SQL or PostgreSQL. A relay can deliver masked non-key fields. Masking a replication key requires a directly applied SQL Server source on a supported route and a compatible target key.

For a new source, create a paused pipeline, read the schema and assign the rules before the first copy. For a known source, you can select its published revision as you create the pipeline.

What does your team need to keep on its replica?

Bring a source schema, a target and a report or workflow that has to keep working. We’ll walk through the fields it needs, the joins to preserve and the rules to apply before the first load.

Cookie settings

Choose what Spectral Core can use on this browser. You can change your choices at any time.

Essential storageRemembers your privacy choices.
Always on