Learning Objectives
By the end of this chapter, you will be able to:
- Perform data loading and unloading using stages, file formats, the COPY INTO command, and error handling options.
- Configure automated ingestion with Snowpipe, Snowpipe Streaming, Streams, Tasks, dynamic tables, and Openflow.
- Identify the Snowflake drivers and connectors and configure storage, API, and Git integrations.
Executive Summary
- Snowflake separates the physical landing zone (stages) from the load operation (COPY INTO), allowing files to be staged once and loaded into many tables with different file formats and on-error policies.
- Snowpipe handles micro-batch ingestion of files in cloud storage, while Snowpipe Streaming writes individual row sets directly into tables without files, with sub-second latency.
- Streams capture row-level change tracking on a source object, and Tasks execute SQL or stored procedures on a schedule or in a DAG, forming the building blocks for change-data pipelines.
- Dynamic tables declare the target shape and a target lag; Snowflake computes the incremental refresh plan. Openflow is the managed multi-modal data integration service based on Apache NiFi.
- External access is mediated by integration objects: storage integrations hand off cloud IAM to Snowflake, API integrations register external HTTPS endpoints for external functions, and Git integrations connect Snowflake objects to a remote repository.
Assumptions
- The reader has completed Chapter 1 (architecture, warehouses, object hierarchy) and Chapter 2 (RBAC, governance, ACCOUNT_USAGE views) and uses the exact terminology defined there.
- All examples assume a Snowflake account on AWS unless the example is region-specific; equivalent constructs apply on Azure and Google Cloud and are flagged inline.
- Identifiers in examples are fictional and consistent across the chapter (database
RAW_DB, schemaLANDING, warehouseLOAD_WH).
