0
0
Snowflakecloud~10 mins

Creating tables (permanent, temporary, transient) in Snowflake - Visual Walkthrough

Choose your learning style9 modes available
Process Flow - Creating tables (permanent, temporary, transient)
Start
Choose Table Type
Permanent
Define Schema & Options
Execute CREATE TABLE
Table Created with chosen type
End
You start by choosing the table type, define its structure, then run the create command to make the table with that type.
Execution Sample
Snowflake
CREATE TABLE perm_table (id INT, name STRING);
CREATE TEMPORARY TABLE temp_table (id INT, name STRING);
CREATE TRANSIENT TABLE trans_table (id INT, name STRING);
Creates three tables: permanent, temporary, and transient with same columns.
Process Table
StepCommandTable TypeActionResult
1CREATE TABLE perm_table (id INT, name STRING);PermanentCreate permanent tableperm_table created, stored permanently
2CREATE TEMPORARY TABLE temp_table (id INT, name STRING);TemporaryCreate temporary tabletemp_table created, exists only in session
3CREATE TRANSIENT TABLE trans_table (id INT, name STRING);TransientCreate transient tabletrans_table created, no fail-safe retention
4Session endsTemporaryTemporary tables droppedtemp_table removed automatically
5Data retention checkPermanentPermanent and transient tables remainperm_table and trans_table still exist
💡 Temporary table removed after session ends; permanent and transient tables persist.
Status Tracker
Table NameBefore CreationAfter CreationAfter Session End
perm_tabledoes not existexists permanentlystill exists
temp_tabledoes not existexists temporarilydoes not exist
trans_tabledoes not existexists transientlystill exists
Key Moments - 3 Insights
Why does the temporary table disappear after the session ends?
Because temporary tables are designed to exist only during the session, as shown in execution_table row 4 where the session ends and the temporary table is dropped automatically.
What is the difference between permanent and transient tables in terms of data retention?
Permanent tables have full data retention and fail-safe, while transient tables do not have fail-safe but still persist after session ends, as seen in execution_table rows 3 and 5.
Can you access a temporary table from another session?
No, temporary tables are session-scoped and cannot be accessed outside the session they were created in, as shown by their removal after session ends in execution_table row 4.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what happens to temp_table after the session ends?
AIt remains available permanently
BIt is automatically dropped
CIt becomes a permanent table
DIt is converted to a transient table
💡 Hint
Check execution_table row 4 where session ends and temp_table is removed.
According to variable_tracker, which table exists after the session ends?
Aperm_table and trans_table
Btemp_table only
Cperm_table only
Dtrans_table only
💡 Hint
Look at variable_tracker columns 'After Session End' for all tables.
If you want a table that persists but does not have fail-safe, which type should you create?
APermanent table
BTemporary table
CTransient table
DExternal table
💡 Hint
Refer to execution_table rows 3 and 5 about transient table properties.
Concept Snapshot
CREATE TABLE creates a permanent table stored permanently.
CREATE TEMPORARY TABLE creates a session-only table dropped after session ends.
CREATE TRANSIENT TABLE creates a persistent table without fail-safe.
Choose table type based on data retention needs.
Temporary tables are session-scoped; permanent and transient persist beyond session.
Full Transcript
This visual execution shows how Snowflake creates three types of tables: permanent, temporary, and transient. First, you choose the table type, then define columns, and run the create command. Permanent tables stay forever until dropped. Temporary tables exist only during the session and are removed automatically when the session ends. Transient tables persist like permanent tables but do not have fail-safe data retention. The execution table traces each step, showing creation and what happens after the session ends. The variable tracker shows the existence of each table before creation, after creation, and after session ends. Key moments clarify why temporary tables disappear and the difference between permanent and transient tables. The quiz tests understanding of table lifetimes and retention. This helps beginners see how table types behave in Snowflake practically.