Database / Snowflake Interview Questions
What is Snowpipe and how does it enable continuous / serverless data ingestion?
Snowpipe is Snowflake's serverless, event-driven data ingestion service. Unlike COPY INTO which requires a running Virtual Warehouse and an explicit trigger, Snowpipe uses Snowflake-managed serverless compute and fires automatically when new files arrive in a stage. Typical latency is under one minute from file arrival to data being queryable.
Snowpipe supports two trigger modes. Auto-ingest (preferred): you configure the cloud storage bucket to emit event notifications — Amazon SQS for S3, Azure Event Grid for Blob Storage, Google Pub/Sub for GCS — to Snowflake. When files land, the notification triggers the pipe automatically with no polling needed. REST API mode: call Snowpipe's REST endpoint programmatically with a list of file paths; useful when you control the producer and need deterministic triggering.
Billing is based on compute seconds consumed for loading, not warehouse credits. This makes Snowpipe cost-effective for small, frequent file arrivals that would otherwise require a warehouse to run continuously.
-- Create a pipe that auto-triggers on new S3 files
CREATE PIPE orders_pipe
AUTO_INGEST = TRUE
AS
COPY INTO orders
FROM @my_s3_stage/orders/
FILE_FORMAT = (TYPE = 'JSON');
-- After creation, retrieve the SQS ARN and configure S3 event notification
SHOW PIPES LIKE 'orders_pipe';
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
