Key Terms β Snowpipe
Snowpipe
Serverless continuous data loading service that automatically ingests files as they arrive in a stage. No virtual warehouse required.
Auto-Ingest
Snowpipe mode where cloud event notifications (SQS, Event Grid, Pub/Sub) automatically trigger file loading.
REST API
Snowpipe's programmatic interface for manually triggering file ingestion via insertFiles() and checking status via insertReport().
Pipe
A Snowflake object (CREATE PIPE) that defines the COPY INTO statement used by Snowpipe.
Snowpipe Streaming
Low-latency row-by-row ingestion via the Snowflake Ingest SDK β sub-second latency without staging files.
What is Snowpipe?
Snowpipe is a serverless continuous data ingestion service. Unlike bulk COPY INTO which you run manually or on a schedule, Snowpipe automatically loads data as files arrive in a stage β with no virtual warehouse needed.
Snowpipe Architecture
Flow diagram: 1) Files arrive in cloud storage (S3/Blob/GCS). 2) Cloud event notification triggers (SQS for AWS, Event Grid for Azure, Pub/Sub for GCP). 3) Snowflake Cloud Services layer receives notification. 4) Serverless compute loads file into target table. 5) Load metadata updated. No virtual warehouse involved β all serverless.

Snowpipe = continuous, serverless, event-driven, per-file billing. COPY INTO = batch, warehouse-based, manual/scheduled. Snowpipe tracks loaded files for 14 days vs COPY INTOβs 64 days.
Auto-Ingest Mode
The recommended approach uses cloud event notifications to trigger Snowpipe automatically:
Auto-Ingest by Cloud Provider
AWS
ServiceSetupAzure
ServiceSetupGCP
ServiceSetup1-- Create notification integration (AWS example)2CREATE NOTIFICATION INTEGRATION my_s3_notification3ENABLED = TRUE4TYPE = QUEUE5NOTIFICATION_PROVIDER = AWS_SQS6DIRECTION = INBOUND7AWS_SQS_ARN = 'arn:aws:sqs:us-east-1:123456789:my-queue';89-- Create the pipe with AUTO_INGEST10CREATE OR REPLACE PIPE sales_pipe11AUTO_INGEST = TRUE12AS13COPY INTO sales.raw_orders14FROM @sales_stage15FILE_FORMAT = (TYPE = JSON STRIP_OUTER_ARRAY = TRUE)16MATCH_BY_COLUMN_NAME = CASE_INSENSITIVE;REST API Mode
For custom orchestration, use Snowpipeβs REST API:
1-- insertFiles: submit files for loading2-- POST https://<account>.snowflakecomputing.com/v1/data/pipes/<pipe>/insertFiles3-- Body: { "files": [{"path": "file1.csv"}, {"path": "file2.csv"}] }45-- insertReport: check load status6-- GET https://<account>.snowflakecomputing.com/v1/data/pipes/<pipe>/insertReport78-- loadHistoryScan: scan load history9-- GET https://<account>.snowflakecomputing.com/v1/data/pipes/<pipe>/loadHistoryScanPipe Management
1-- Check pipe status2SELECT SYSTEM$PIPE_STATUS('sales_pipe');3-- Returns: executionState, pendingFileCount, lastIngestedTimestamp45-- Pause a pipe6ALTER PIPE sales_pipe SET PIPE_EXECUTION_PAUSED = TRUE;78-- Resume a pipe9ALTER PIPE sales_pipe SET PIPE_EXECUTION_PAUSED = FALSE;1011-- View pipe definition12DESCRIBE PIPE sales_pipe;13SHOW PIPES;1415-- View load history16SELECT * FROM TABLE(INFORMATION_SCHEMA.COPY_HISTORY(17TABLE_NAME => 'RAW_ORDERS',18START_TIME => DATEADD('hour', -24, CURRENT_TIMESTAMP())19));Snowpipe vs COPY INTO
Snowpipe vs Bulk COPY INTO
Snowpipe tracks loaded files for 14 days. COPY INTO tracks for 64 days. Re-loading the same file within this window is skipped by default (unless FORCE = TRUE for COPY INTO).
Snowpipe Streaming
Snowpipe Streaming Architecture
Unlike regular Snowpipe which requires files in a stage, Snowpipe Streaming uses the Snowflake Ingest SDK to write rows directly to Snowflake tables with sub-second latency. No intermediate files needed. Flow: Application β Snowflake Ingest SDK (Java/Python) β Snowflake table directly.

Regular Snowpipe: files β stage β load (minutes latency). Snowpipe Streaming: rows β SDK β table directly (sub-second latency). Streaming uses the Snowflake Ingest SDK for Java or Python. Popular for IoT, clickstream, and real-time event data.
StepByStep: Setting Up Snowpipe
Setting Up Snowpipe End-to-End
Create a stage
Create an external stage pointing to your cloud storage bucket.
CREATE STAGE sales_stage
URL = 's3://my-bucket/sales/'
STORAGE_INTEGRATION = my_s3_int
FILE_FORMAT = (TYPE = CSV SKIP_HEADER = 1);Create the target table
Create the table that Snowpipe will load data into.
CREATE TABLE sales.raw_orders (
order_id INT, customer_id INT,
order_date DATE, amount DECIMAL(12,2)
);Create the pipe
Define the COPY INTO statement as a pipe with AUTO_INGEST = TRUE.
CREATE PIPE sales_pipe AUTO_INGEST = TRUE
AS COPY INTO sales.raw_orders
FROM @sales_stage;Configure cloud notifications
Set up S3/Blob/GCS event notifications to send to Snowflake's SQS queue. Get the notification channel ARN from DESCRIBE PIPE.
DESCRIBE PIPE sales_pipe;
-- Note the notification_channel value for AWS SQS configurationVerify
Upload a test file and check the status.
SELECT SYSTEM$PIPE_STATUS('sales_pipe');
SELECT COUNT(*) FROM sales.raw_orders;Cheat Sheet
Snowpipe Quick Reference
Key Facts
ComputeLatencyMetadataStatusHistoryCommands
CreatePauseResumeDescribePractice Quiz
How long does Snowpipe track previously loaded files to prevent duplicate loading?
Which compute resource does Snowpipe use to load data?
What is the key difference between Snowpipe and Snowpipe Streaming?
Flashcards
What are the two modes of triggering Snowpipe?
1) Auto-ingest: cloud event notifications (SQS/Event Grid/Pub-Sub) automatically trigger loading when files arrive. 2) REST API: programmatically call insertFiles() to submit specific files for loading.
How is Snowpipe billed compared to COPY INTO?
Snowpipe: per-file serverless credits β no warehouse needed. COPY INTO: per-second warehouse credits based on warehouse size. Snowpipe is cost-efficient for frequent small files; COPY INTO is better for large batch loads.
What does SYSTEM$PIPE_STATUS return?
JSON object with: executionState (RUNNING/PAUSED), pendingFileCount (files waiting to load), lastIngestedTimestamp, and other status information about the pipe.
How long does Snowpipe track loaded files vs COPY INTO?
Snowpipe: 14 days. COPY INTO: 64 days. Within these windows, re-submitting the same file is skipped to prevent duplicates.
What is the typical latency for Snowpipe vs Snowpipe Streaming?
Regular Snowpipe: minutes (near real-time). Snowpipe Streaming: sub-second latency. Streaming uses the Snowflake Ingest SDK to bypass file staging entirely.
Resources
Next Steps
Reinforce what you just read
Study the All flashcards with spaced repetition to lock it in.