Database / Snowflake Interview Questions
What are the stages in Snowflake (internal vs external) and how do you use them for data loading?
A stage in Snowflake is a named location holding data files before they are loaded into a table (or after being unloaded from one). Stages abstract the physical storage location so the COPY INTO command works identically whether files sit in Snowflake-managed storage or in your own cloud bucket.
Internal stages are managed by Snowflake within its own cloud storage. Three kinds exist: the user stage (@~, one per user, auto-created), the table stage (@%table_name, one per table, auto-created), and named internal stages (@my_stage, created explicitly, shareable across roles and sessions).
External stages point to customer-owned cloud storage (S3 bucket, Azure Blob container, GCS bucket). Defined with a URL and either inline credentials or a Storage Integration object (recommended — avoids embedding credentials in DDL). Supports all the same file formats as COPY INTO.
-- Create a named internal stage with a named file format
CREATE STAGE my_internal_stage
FILE_FORMAT = (TYPE = 'CSV' FIELD_DELIMITER = ',' SKIP_HEADER = 1);
-- Upload a local file to the internal stage (run in SnowSQL)
PUT file:///local/path/orders.csv @my_internal_stage;
-- List files in a stage
LIST @my_internal_stage;
-- Create an external stage pointing to S3 using a Storage Integration
CREATE STAGE my_s3_stage
URL = 's3://my-bucket/data/'
STORAGE_INTEGRATION = my_s3_integration
FILE_FORMAT = (TYPE = 'PARQUET');
More Related questions...