Designing High-Performance ETL Pipelines in Snowflake
Instruction: Outline the design of a high-performance ETL pipeline in Snowflake, focusing on scalability and efficiency.
Updated
Official answer
Set a throughput and freshness target alongside correctness, recovery and cost requirements. Inventory source rate, file/event sizes, update/delete behavior and the downstream grain before choosing batch, streaming or mixed ingestion.
Land replayable raw input with stable source identifiers. For file ingestion, use supported stages and bulk loading with appropriate file sizes, parallelism and explicit error handling. Track accepted and rejected records and reconcile expected inputs. Avoid assuming repeated loads or retries are always harmless.
Transform in set-based steps with selective reads and joins at the correct grain. Separate ingestion, transformation and interactive workloads when contention justifies it. Increase warehouse size for a measured execution bottleneck; add multi-cluster capacity for concurrency. Neither action repairs a bad join or an unbounded scan.
Use bounded incremental windows or change tracking, with a strategy for late events, deletes and backfills. Commit target updates with the associated progress and make retries safe after an uncertain acknowledgment. Publish validated outputs only.
Test changes on an appropriately secured clone or separate test dataset. A supported standard-table clone is writable, and changes can create additional storage. Cloning data does not create separate compute or automatically isolate a heavy test from production workloads.
Measure end-to-end freshness, rows/bytes processed, reconciliation failures, queued versus executing time, spill and credits per successful batch. Test bursts, corrupt input and retries. Choose the smallest configuration that meets the objective with recovery capacity, then remeasure as data and workload patterns change.
Loading guidance, cloning, warehouse considerations, transactions