Snowflake data masking for tables and free text

Call Protecto from a Snowflake UDF to mask PII and PHI in columns and text fields. Each value gets a consistent, format-preserving token, so analysis and AI still work.

SOC 2 Type II · ISO 27001 · HIPAA, BAA available

Snowflake tableSUPPORT.PUBLIC.CUSTOMERS

SELECT name, ssn, note FROM customers → via PROTECTO_MASK UDF

Dave Smith<PER>KTLD EROVLA</PER>
222-44-4344<SSN>444-11-1711</SSN>
Asked to change phone to 415-555-0182Asked to change phone to <PHONE>628-555-0947</PHONE>
Jane Brown<PER>BTND XQIPN</PER>
333-55-9585<SSN>999-22-3262</SSN>
Refund approved by Dave SmithRefund approved by <PER>KTLD EROVLA</PER>

6 sensitive values exposedSame person, same token

Synthetic example

Why column masking misses PII in free text

A support team loads ticket exports into Snowflake. A masking policy covers the email column. The comments column holds names, phone numbers and card details that customers typed in, and every analyst with access can read them.

Data Classification and Dynamic Data Masking (DDM) work column by column. They do not find and replace the sensitive values inside a text field.

Whole columns get hidden.

A masking policy replaces the full value, so analysts and AI lose the useful text along with the sensitive parts.

Regex misses what people type.

Pattern rules catch well-formed numbers but miss names and details written in free text.

Masked values stop matching.

If the same customer is masked differently in two tables, joins and counts break.

How Snowflake data masking works with Protecto

Protecto finds sensitive values, swaps them for tokens and keeps the originals for the people allowed to see them.

01

Find and mask PII and PHI

Protecto detects sensitive values in structured columns and in free text such as comments and descriptions, then replaces only those values.

02

Keep the data useful

Tokens keep the format and type of the original. The same value always gets the same token, so joins, counts and AI answers stay accurate.

03

Unmask by role

Users with an authorized role can see the original values when they need them. Everyone else sees tokens.

Mask Snowflake data with one UDF call

Protecto’s User Defined Function (UDF) calls the Protecto API from inside your Snowflake environment. Add one function call to your SQL or Snowpark code, and the masked text comes back as a new column.

No change to your tables or warehouse setup. Your data keeps its place in Snowflake.

What Protecto adds to Snowflake

Masking that protects the sensitive values and leaves the rest of your data ready for analytics and AI.

Masking inside free text

Finds names, phone numbers, card numbers and health details inside comment and description fields.

Only sensitive values change

The rest of each field stays readable, unlike masking that hides the whole column.

Unmasking by role

Only users your policy authorizes can see original values. Others see tokens.

One token per value

A value gets the same token in every table and dataset, so data integrity holds.

Controls for GDPR, HIPAA and CCPA

Masking, unmasking by role and audit logs give your privacy program controls it can show auditors.

Built for large tables

Real-time APIs handle single requests. Asynchronous APIs handle high data volumes.

The complete playbook for securing RAG on Snowflake Cortex AI

A step-by-step guide to keeping sensitive data protected when you build RAG on Snowflake Cortex AI.

Cover Of The Enhancing Rag Security And Compliance Whitepaper For Snowflake Cortex Ai

Why data teams use Protecto with Snowflake

Protecto masks sensitive data while keeping its consistency, format and type, so teams can run analytics, statistical analysis and RAG without exposing PII or PHI.

One API for every pipeline

The same API runs from a Snowflake UDF, Databricks, Kafka or Spark, so one policy covers all of them.

Real-time and batch

Mask single records as they arrive, or large tables with asynchronous jobs.

SaaS or your environment

Use Protecto as SaaS or run it on your own servers, with multi-tenant support either way.

Originals kept in a vault

Original values are stored in Protecto Privacy Vault, apart from the masked data in Snowflake.

Security & compliance

Built for regulated data at enterprise scale.

Protecto combines data protection, audit logs, and ready-to-use policies for regulated data, whether deployed as SaaS, on-prem, in a private cloud, or air-gapped.

SOC 2 Type II

Audited controls

ISO 27001

Certified ISMS

HIPAA

BAA available

GDPR

EU data ready

DPDP

India privacy law

CCPA / CPRA

US privacy
Independently verified to outperform AWS Comprehend and Microsoft Presidio · audit logs on every scan, mask, and unmask.

Questions about Snowflake data masking

How is Protecto different from Snowflake Dynamic Data Masking?

Dynamic Data Masking applies a masking policy to a whole column, so the full value is hidden from roles that cannot see it. Protecto finds the sensitive values inside each field, including free text such as comments, and replaces only those values with consistent tokens. The rest of the text stays usable for analysis and AI.

Through a User Defined Function (UDF) that calls the Protecto API from your Snowflake environment. You add one function call to your SQL or Snowpark code, without major changes to your existing setup.

No. The same value always gets the same token, in any table and any session, so joins and counts work on masked data.

200+ entity types across PII, PHI and PCI, such as names, phone numbers, email addresses, card numbers, Social Security numbers and health data. You can add custom entities for your own IDs and patterns.

You decide which roles can see original values. Users with those roles get real values back when they request them, and everyone else sees tokens.

Protecto is SOC 2 Type II and ISO 27001 certified and HIPAA compliant. Masking, unmasking by role and audit logs support GDPR, HIPAA and CCPA requirements for protecting personal data. When Protecto hosts the service or can access your installation, it signs a BAA before PHI flows.

Mask PII in Snowflake without losing value

Bring a sample table with free-text columns, synthetic if you prefer. We will show you the UDF call and the masked output.

Cover of the Enhancing RAG Security and Compliance whitepaper for Snowflake Cortex AI
Whitepaper

Securing RAG on Snowflake Cortex AI

A step-by-step guide to securing enterprise RAG on Snowflake Cortex AI with Protecto.

By submitting you agree to Protecto’s privacy policy.

New: Protecto now runs inside LiteLLM. Control what sensitive data your models and tools see.
Read the launch blog