A Stage is the intermediate file location Snowflake uses for loading (ingest) and unloading (export) data. Bulk loads via COPY INTO, automated ingestion through Snowpipe, and data exports almost always go through a stage. Stages are a required Data Loading domain topic on the SnowPro Core exam.
Snowflake offers 4 types of stages, each with its own use case, management model, and security profile.
| Stage Type | Reference Syntax | Creation Method | GRANT Support | Primary Use Case |
|---|---|---|---|---|
| User Stage | @~ | Automatic (per user) | Not supported | Personal scratch space for ad-hoc work |
| Table Stage | @%table_name | Automatic (per table) | Not supported | Temporary loads dedicated to a specific table |
| Named Internal Stage | @stage_name | CREATE STAGE | Supported | Shared loads/unloads with permission management |
| External Stage | @stage_name | CREATE STAGE | Supported | Integration with existing data on S3, Azure Blob, or GCS |
A Named Internal Stage stores files inside Snowflake's internal storage. Because it supports GRANT-based permission control, it is preferred over User and Table Stages for team operations.
-- Create a Named Internal Stage
CREATE OR REPLACE STAGE hr_load_stage
FILE_FORMAT = (TYPE = CSV SKIP_HEADER = 1 FIELD_OPTIONALLY_ENCLOSED_BY = '"')
COMMENT = 'CSV load stage for the HR team';
-- Upload files (SnowSQL / PUT)
PUT file:///data/employees.csv @hr_load_stage AUTO_COMPRESS = TRUE;
-- List files on the stage
LIST @hr_load_stage;
-- Load into the target table
COPY INTO hr.employees
FROM @hr_load_stage
PATTERN = '.*employees.*\.csv\.gz'
ON_ERROR = 'CONTINUE';An External Stage references external storage on S3, Azure Blob Storage, or GCS directly. Because it does not copy data into Snowflake's internal storage, it is the ideal choice for integrating with an existing data lake.
A Storage Integration is the object that securely manages access between Snowflake and cloud storage using IAM role-based delegation. It removes the need to embed long-lived keys and centralizes management under the ACCOUNTADMIN role.
-- Create the Storage Integration (ACCOUNTADMIN)
CREATE OR REPLACE STORAGE INTEGRATION s3_integration
TYPE = EXTERNAL_STAGE
STORAGE_PROVIDER = 'S3'
STORAGE_AWS_ROLE_ARN = 'arn:aws:iam::123456789012:role/snowflake-access'
ENABLED = TRUE
STORAGE_ALLOWED_LOCATIONS = ('s3://data-lake-prod/raw/', 's3://data-lake-prod/staging/');
-- Fetch the values needed for the IAM trust relationship
DESC INTEGRATION s3_integration;
-- Create the External Stage
CREATE OR REPLACE STAGE data_lake_stage
STORAGE_INTEGRATION = s3_integration
URL = 's3://data-lake-prod/raw/'
FILE_FORMAT = (TYPE = PARQUET);COPY INTO works in both directions: loading from a stage into a table, and unloading from a table to a stage.
-- Load: stage -> table
COPY INTO analytics.orders
FROM @data_lake_stage/orders/2026/03/
FILE_FORMAT = (TYPE = PARQUET)
MATCH_BY_COLUMN_NAME = CASE_INSENSITIVE;
-- Unload: table -> stage
COPY INTO @export_stage/monthly_report/
FROM (
SELECT region, SUM(amount) AS total_amount
FROM analytics.orders
WHERE order_date >= '2026-03-01'
GROUP BY region
)
FILE_FORMAT = (TYPE = CSV COMPRESSION = GZIP)
HEADER = TRUE
OVERWRITE = TRUE;| Option | Purpose | Default |
|---|---|---|
| ON_ERROR | How to handle files with errors | ABORT_STATEMENT |
| PURGE | Auto-delete files after a successful load | FALSE |
| MATCH_BY_COLUMN_NAME | Auto-map source fields by column name | NONE |
| PATTERN | Filter file names with a regular expression | (none) |
| VALIDATION_MODE | Validate input before loading | (none) |
Defining a Named File Format up front lets you reuse a consistent format across multiple stages and COPY INTO statements.
-- Create a Named File Format
CREATE OR REPLACE FILE FORMAT csv_standard
TYPE = CSV
SKIP_HEADER = 1
FIELD_DELIMITER = ','
FIELD_OPTIONALLY_ENCLOSED_BY = '"'
NULL_IF = ('NULL', 'null', '')
EMPTY_FIELD_AS_NULL = TRUE;
-- Reference the file format from a stage
CREATE OR REPLACE STAGE shared_csv_stage
FILE_FORMAT = csv_standard;Directory Tables let you query file metadata on a stage (file path, size, last modified, etc.) as if it were a table. Enable the feature by specifying DIRECTORY = (ENABLE = TRUE) when you create the stage.
-- Enable the Directory Table
ALTER STAGE data_lake_stage SET DIRECTORY = (ENABLE = TRUE);
-- Manually refresh the metadata
ALTER STAGE data_lake_stage REFRESH;
-- Query the Directory Table
SELECT *
FROM DIRECTORY(@data_lake_stage)
WHERE FILE_URL LIKE '%2026/03%'
ORDER BY LAST_MODIFIED DESC;Data Loading / Security
問題 1
You are designing a configuration to load Parquet files from a shared S3 bucket into Snowflake. The security requirement states that long-lived keys must not be stored in Snowflake. Which configuration is most appropriate?
正解: B
To satisfy the requirement that long-lived keys must not be stored in Snowflake, the best fit is to configure IAM role-based delegation through a Storage Integration and reference it from an External Stage. Passing AWS_KEY_ID directly embeds a long-lived key and fails the requirement. An Internal Stage requires files to be PUT into Snowflake first and does not reference the existing S3 location directly.
Can you create an External Stage without a Storage Integration?
Yes, it is technically possible to create an External Stage by passing AWS_KEY_ID and AWS_SECRET_KEY directly. However, embedding credentials in the stage definition creates a serious security risk. Snowflake's official documentation strongly recommends using a Storage Integration, which delegates access via an IAM role and eliminates the need to manage long-lived keys. The exam consistently frames Storage Integration as the 'more secure choice.'
What are the limitations of User Stages and Table Stages?
A User Stage (@~) is auto-provisioned per user as a personal area and cannot be accessed by other users. A Table Stage (@%table_name) is auto-provisioned per table and is dedicated to COPY INTO that table. Both are convenient because they require no CREATE STAGE statement, but unlike Named Stages they cannot pre-define a file format or accept GRANTs. For team operations, a Named Internal Stage is the recommended choice.
Does COPY INTO automatically delete files from the stage after loading?
By default, loaded files remain in the stage. If you set PURGE = TRUE on COPY INTO, the target files are automatically removed from the stage after a successful load. PURGE can struggle to judge partially loaded files, however, so if you need strict file management, consider using the REMOVE command for manual cleanup instead.
Practice with certification-focused question sets
無料で問題を解いてみるNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Snowflake Certifications: All 11 Exams Explained (2026)
Every SnowPro certification — Associate, Core, Specialty, Ad...
Snowflake Exam Difficulty Ranking: All 11 Certs Compared (2026)
All 11 SnowPro exams ranked by difficulty with study-time es...
Snowflake Study Guide: Fastest Pass Route by Exam (2026)
How to pass SnowPro certifications efficiently — official ma...
SnowPro Core (COF-C03): Complete Exam Guide (2026)
Pass the SnowPro Core exam — six domains, scope, sample ques...
SnowPro Associate Platform (SOL-C01): Complete Guide (2026)
The entry-level SnowPro Associate exam — scope, weighting, s...