Skip to main content

Secure Views & Secure Data Sharing Between Teams

✨ Story Time — “Sharing Without Risk”

Meet Priya, a data engineer.

Her company wants the sales team and marketing team to access customer data:

  • Sales team: Needs contact info + last purchase
  • Marketing team: Needs demographics + campaign history

But the company also needs to protect sensitive info like emails, credit card data, and personal identifiers.

The solution? Secure Views and Snowflake Secure Data Sharing.


🧩 What are Secure Views?

A Secure View is a view that:

  • Hides sensitive columns
  • Prevents underlying table access
  • Enforces row- or column-level security

Key features:

  • Data in secure views cannot be bypassed
  • Queries on secure views cannot be modified to reveal hidden data
  • Works seamlessly with roles and access policies

Example:

CREATE SECURE VIEW marketing_customers AS
SELECT customer_id, campaign_id, age_group
FROM customers;
  • Sensitive columns like email, phone, or credit_card are hidden
  • Users can query only allowed columns

🔍 How Secure Views Work

  1. Secure Views mask underlying data
  2. Users query the view instead of the table
  3. Snowflake ensures no access to hidden columns or underlying table
  4. Ideal for cross-team data access and compliance

Analogy: Think of a curtain in front of sensitive info — everyone sees only what they’re allowed.


🎯 What is Secure Data Sharing?

Secure Data Sharing allows you to share Snowflake data with other accounts or teams without copying or moving data:

  • No ETL needed
  • No file exports
  • Immediate access to shared data
  • Works with Secure Views to enforce access policies

Example:

CREATE SHARE marketing_share;
GRANT USAGE ON DATABASE marketing_db TO SHARE marketing_share;
GRANT SELECT ON SECURE VIEW marketing_customers TO SHARE marketing_share;
  • Marketing team in a different account can query the secure view
  • Sensitive data is protected automatically

🧪 Real-World Use Case

Scenario: Cross-department collaboration

  1. Finance team shares transaction summary with auditing team
  2. Auditing team gets read-only access
  3. Sensitive info like customer PII is never exposed
  4. Updates in the original table are immediately visible to auditors

Result: Collaboration without compromising security or compliance.


⚡ Benefits

BenefitExplanation
Secure accessProtect sensitive columns and rows
Real-time sharingNo need to copy/export data
Compliance-readySupports GDPR, HIPAA, and internal policies
Simplified governanceUse roles and shares instead of separate pipelines
Cost-effectiveNo extra storage required

🧠 Best Practices

  • Always use Secure Views when exposing sensitive data
  • Combine with roles and RBAC for fine-grained control
  • Use Secure Data Sharing for cross-account or cross-team collaboration
  • Avoid giving direct table access unless necessary
  • Monitor shares and view usage regularly for auditing

📘 Summary

  • Secure Views hide sensitive data while allowing safe queries.
  • Secure Data Sharing enables teams or accounts to access data without moving or copying it.
  • Together, they allow collaboration, compliance, and real-time data access.
  • Snowflake ensures data privacy, governance, and minimal storage overhead.
  • Ideal for companies needing cross-team access with strict security rules.

✅ Next Topic

Warehouse Sizing — Small vs Medium vs Large Explained With Cost