Snowflake provides various table types to meet different data storage and processing requirements. Each table type has specific characteristics regarding persistence, performance, cost, and Time Travel capabilities.
┌───────────────────────────────────────────────────────────────────────┐ │ SNOWFLAKE TABLE TYPES │ ├───────────────────────────────────────────────────────────────────────┤ │ │ │ ┌──────────────────┐ ┌───────────────────┐ ┌───────────────────┐ │ │ │ PERMANENT │ │ TEMPORARY │ │ TRANSIENT │ │ │ │ TABLES │ │ TABLES │ │ TABLES │ │ │ │ │ │ │ │ │ │ │ │ ✓ Fail-safe │ │ ✗ Fail-safe │ │ ✗ Fail-safe │ │ │ │ ✓ Time Travel │ │ ✓ Time Travel │ │ ✓ Time Travel │ │ │ │ (90 days) │ │ (1 day) │ │ (1 day) │ │ │ │ │ | Current Session │ │ Between Sessions │ │ │ └──────────────────┘ └───────────────────┘ └───────────────────┘ │ │ │ │ ┌──────────────────┐ ┌───────────────────┐ ┌───────────────────┐ │ │ │ EXTERNAL │ │ DYNAMIC │ │ HYBRID │ │ │ │ TABLES │ │ TABLES │ │ TABLES │ │ │ │ │ │ │ │ │ │ │ │ Data Outside │ │ Auto-refresh │ │ OLTP + OLAP │ │ │ │ Snowflake │ │ Materialized │ │ Unistore │ │ │ └──────────────────┘ └───────────────────┘ └───────────────────┘ │ │ │ │ ┌──────────────────┐ ┌───────────────────┐ ┌───────────────────┐ │ │ │ ICEBERG │ │ EVENT │ │ DIRECTORY │ │ │ │ TABLES │ │ TABLES │ │ TABLES │ │ │ │ │ │ │ │ │ │ │ │ Apache Format │ │ Log/Telemetry │ │ Stage Files │ │ │ │ Open Table │ │ Storage │ │ Catalog │ │ │ └──────────────────┘ └───────────────────┘ └───────────────────┘ │ └───────────────────────────────────────────────────────────────────────┘
Permanent tables are the default table type in Snowflake, designed for storing critical business data that requires maximum data protection.
CREATE TABLE customer_data (
customer_id INTEGER,
customer_name VARCHAR,
created_date DATE
);
Temporary tables exist only within a session and are automatically dropped when the session ends.
CREATE TEMPORARY TABLE temp_staging (
id INTEGER,
data VARCHAR
);
Transient tables are a middle ground between permanent and temporary tables, offering persistence without Fail-safe protection.
CREATE TRANSIENT TABLE staging_data (
record_id INTEGER,
processed_flag BOOLEAN
);
External tables allow querying data stored outside of Snowflake, in external cloud storage locations.
CREATE EXTERNAL TABLE ext_customer_data WITH LOCATION = @my_external_stage/data/ FILE_FORMAT = (TYPE = PARQUET);
Dynamic tables are continuously updated materialized views that automatically refresh as underlying data changes.
CREATE DYNAMIC TABLE sales_summary
TARGET_LAG = '1 minute'
WAREHOUSE = compute_wh
AS
SELECT
product_id,
SUM(quantity) as total_quantity,
SUM(amount) as total_amount
FROM sales_transactions
GROUP BY product_id;
Hybrid tables (Unistore) combine OLTP and OLAP capabilities, supporting both transactional and analytical workloads.
CREATE HYBRID TABLE orders (
order_id NUMBER(38,0) NOT NULL PRIMARY KEY,
customer_id NUMBER(38,0),
order_date TIMESTAMP_NTZ,
status VARCHAR(20),
INDEX idx_customer (customer_id),
INDEX idx_date (order_date)
);
Iceberg tables use Apache Iceberg table format, providing an open table format for large analytic datasets.
CREATE ICEBERG TABLE customer_iceberg (
customer_id INTEGER,
customer_name STRING,
registration_date DATE
)
CATALOG = 'SNOWFLAKE'
EXTERNAL_VOLUME = 'my_external_volume'
BASE_LOCATION = 'customer_data/';
Event tables are specialized tables for storing and analyzing log and telemetry data efficiently.
Directory tables provide a catalog view of files in a stage, allowing SQL queries over file metadata.
┌──────────────┬────────────┬─────────────┬───────────┬───────────┬───────────┐ │ Feature │ Permanent │ Temporary │ Transient │ External │ Dynamic │ ├──────────────┼────────────┼─────────────┼───────────┼───────────┼───────────┤ │ Time Travel │ 0-90 days │ 0-1 day │ 0-1 day │ No │ Yes │ ├──────────────┼────────────┼─────────────┼───────────┼───────────┼───────────┤ │ Fail-safe │ 7 days │ No │ No │ No │ No │ ├──────────────┼────────────┼─────────────┼───────────┼───────────┼───────────┤ │ Persistence │ Until │ Session │ Until │ External │ Until │ │ │ dropped │ only │ dropped │ files │ dropped │ ├──────────────┼────────────┼─────────────┼───────────┼───────────┼───────────┤ │ DML Support │ Yes │ Yes │ Yes │ No │ No* │ ├──────────────┼────────────┼─────────────┼───────────┼───────────┼───────────┤ │ Clone │ Yes │ No │ Yes │ No │ Yes │ ├──────────────┼────────────┼─────────────┼───────────┼───────────┼───────────┤ │ Storage Cost │ High │ Low │ Medium │ Low │ Medium │ ├──────────────┼────────────┼─────────────┼───────────┼───────────┼───────────┤ │ Use Case │ Production │ ETL │ Staging │ Data Lake │ Analytics │ └──────────────┴────────────┴─────────────┴───────────┴───────────┴───────────┘ * Dynamic tables are read-only from user perspective, auto-updated by system