Domain: Snowflake Features & Architecture
· 698 words · 10 min read

Table Types and Views

Overview

Snowflake provides various table types and view architectures to handle different data engineering, temporary processing, and application workloads. For the COF-C03 exam, knowing the differences in persistence, Time Travel, Fail-Safe, and use cases for each table type is heavily tested.

Key Concepts: Table Types

1. Permanent Tables

2. Transient Tables

3. Temporary Tables

4. External Tables

5. Dynamic Tables

6. Hybrid Tables

Key Concepts: Views

Standard Views

A saved SQL query. Evaluated at query time. Does not store data physically.

Secure Views

Materialized Views

Table Comparison

| Table Type | Scoped to | Time Travel | Fail-Safe | Enforced PKs |

| :--- | :--- | :--- | :--- | :--- |

| Permanent | Database/Schema | 0-90 days | 7 days | No |

| Transient | Database/Schema | 0-1 day | 0 days | No |

| Temporary | Session | 0-1 day | 0 days | No |

| Hybrid | Database/Schema | 0-90 days | 7 days | Yes |

SQL Examples


-- Create a Transient Table
CREATE TRANSIENT TABLE staging_data (id INT, val VARCHAR);

-- Create a Temporary Table
CREATE TEMPORARY TABLE session_scratch (id INT);

-- Create a Secure View
CREATE SECURE VIEW secure_sales_vw AS
SELECT * FROM sales WHERE region = 'US';

Exam Tips

⚠️ Crucial for COF-C03:

Key Takeaways