Module 05 · Lesson 2 of 15Detailed study · about 20 min

Internal and external stages: choose the location

Use a user stage for personal files, a table stage for a table-related workflow, or a named stage for a reusable managed location.

Understand the idea

An internal stage stores uploaded files in storage managed by Snowflake. An external stage references files that remain in a cloud storage location such as Amazon S3, Azure Blob Storage or Google Cloud Storage. Creating the external stage does not copy those files into an internal stage.

Key ideas in simple English
ConceptWhat it means
@~Current user stage.
@%table_nameStage associated with a table.
@stage_nameNamed internal or external stage.

A concrete example

Your finance application already delivers files into an S3 bucket. A named external stage can reference that delivery location. Your colleague’s one-off laptop export can use a named internal stage.

Remember: Internal versus external tells you where files live. User, table and named describe the internal-stage choices. Use @ when referring to staged files.

Explain it step by step · full theory

Internal versus external describes file storage

An internal stage stores uploaded files in storage managed by Snowflake. An external stage references files that remain in a cloud storage location such as Amazon S3, Azure Blob Storage or Google Cloud Storage. Creating the external stage does not copy those files into an internal stage.

Use a local-file scenario to remember the difference. A CSV on your laptop can be uploaded to an internal stage. A CSV already delivered to the company’s cloud bucket can be accessed through an external stage after access is configured.

There are three kinds of internal stages

A user stage is associated with a user; @~ refers to your own user stage. A table stage belongs to an existing table; @%ORDERS refers to the stage for that table in the current database and schema. A named internal stage is a separate object that you create and grant access to.

A table stage and its table are still different things. A file in @%ORDERS is not a row in ORDERS. For our shared learning pipeline, a named stage gives us an explicit name and a reusable location independent of any one destination table.

Choose based on the workflow
StageReference exampleTypical fit
User@~Files for the current user
Table@%ORDERSFiles associated with one existing table
Named internal@orders_stageA reusable upload location for a team
Named external@orders_externalFiles already in an approved cloud location

Read the @ symbol correctly

CREATE STAGE orders_stage creates an object. LIST @orders_stage addresses its files. The @ symbol tells the statement that you are referring to a staged location. It is not part of the stored object name.

A path after the stage name narrows the location. @orders_stage/incoming/ means the incoming/ prefix within that stage. It is not a new schema and does not require a separate CREATE STAGE statement.

Make the choice using the actual requirement

Suppose two analysts need to inspect daily exports before loading different tables. A named internal stage is a clear fit if the exports arrive locally. If the export system already writes to S3, a named external stage can avoid an unnecessary download and re-upload.

Neither option removes the need for access control or a matching file format. Location, permission and interpretation remain separate concerns.

Words used in this lesson
Internal stage
A location for files in Snowflake-managed storage.
External stage
A named object referencing files in external cloud storage.
Prefix
The beginning of a file path used to narrow a staged location.

See how it works

Choose a step to explore the idea at your own pace.

Open the interactive explanation
Interactive explainer1 / 4

Internal and external stages: choose the location

Laptop
Cloud bucket
Choose a route

Ask where

Start with the existing location of the source files.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Ask where

    Start with the existing location of the source files.

  2. Internal route

    Local files are uploaded into Snowflake-managed staging storage.

  3. External route

    A named external stage points to approved cloud storage.

  4. Reference

    Use @ to address files through a stage.

Try the SQL or command

Read → predict → run in your learning environment → compare. You can also learn by reading without an account.

New to SQL? Where to run it and how to read it

A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.

  1. No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
  2. For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
  3. Read the entire example, including comments beginning with --. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor.
  4. Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
SELECT / FROM
Choose the values to return / identify their input.
VALUES / COLUMN1
VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
AS / WITH
AS gives a result a readable name. WITH names a temporary query step within one statement.
NULL / ::
NULL means missing or unknown. The :: notation converts a value to a named data type.
Session
One connection and its settings. Keep related transaction steps in the same session.
Database.schema.table
A full address for stored data. It is separate from the warehouse that processes queries.

Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →

Help with common practice errors
  • No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
  • Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
  • Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
  • Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.
Shared orders.csv and internal-stage setup
Our shared source file

Four orders, one CSV contract

Every CSV lesson uses this fictional orders.csv. One data record represents one order. The first line is a header; the four remaining lines are data. All amounts use the same fictional currency.

order_id,customer_name,amount,order_date
101,"Asha, Rao",120.50,2025-01-01
102,Ben,,2025-01-02
103,Cara,NULL,2025-01-03
104,Dev,0,2025-01-04

Notice the comma inside Asha’s quoted name, Ben’s empty amount, Cara’s literal NULL marker and Dev’s zero. We will follow these exact values from file bytes to parsed fields.

Setup order for optional manual practice
  1. Select an authorized sandbox database and schema. Keep this context consistent across your client sessions.
  2. Create orders_csv_v1 using lesson 3, then orders_stage using lesson 5. Use fresh sandbox names; do not replace existing shared objects.
  3. Save the text above as a UTF-8 file named orders.csv. Upload it with a supported local client or the named-stage upload interface.
  4. Keep only this sample file under the incoming/ prefix when following the four-row expected results.
  5. Select an authorized warehouse for the staged SELECT examples. File previews use compute; this website runs no SQL.

The examples assume the required role privileges described in the lessons. The external-stage and JSON examples have their own additional setup and are clearly marked.

Before running this lesson

Internal-stage learning path. Use L2_OBJECTS_LAB.SALES from Module 03, with an authorized role and warehouse. Create orders_csv_v1 in lesson 3, then orders_stage in lesson 5. Save the exact sample as UTF-8 orders.csv. Keep only this file in incoming/ for the illustrated four-row results. Use fresh names if a setup object already exists.

Recognize stage references

SQL · example
-- Reference examples; ORDERS must exist for its table stage.
LIST @~;
LIST @%ORDERS;
-- orders_stage must exist before this statement.
LIST @orders_stage/incoming/;

What to expect and why

Each LIST inspects file entries in a different stage location. These are alternatives for understanding notation, not setup commands to run before the named stage exists.

Check your understanding

Choose an answer, then check your reasoning. This is practice, not a scored test.

Which reference means the current user’s stage?

Try it yourself

A team receives local exports and shares them across two table-loading workflows. Which stage would you choose and why?

Compare your reasoning

A named internal stage gives the team an explicit shared upload location that is independent of either destination table. Grant the participating roles the required access.

Official sources and curriculum

Module 05 · See module scope