Level 2 · Module 8 · Guided learning

COPY INTO and data loading

You can find and preview a source file. Now learn how its records reach a table, how to spot an incomplete load, and how to recover without duplicating orders. Follow the same four orders from Module 7, then investigate one deliberately invalid amount.

Before you begin

Complete Module 7: Stages and file formats, especially CSV rules and staged previews. You should understand SELECT, COUNT, SUM and NULL from Module 5. No account is needed to study the worked results; optional manual SQL requires the stated sandbox setup.

Nine lessons from a file to a verified load

First prepare and validate the clean delivery. Then load it and explain every expected value. With that baseline established, compare file selection, error handling, history, replay risks and a small transformation.

Every lesson includes detailed explanations, a step-through diagram, a practical scenario, an explained question and a challenge with reasoning. SQL and result tables are illustrative; the website does not execute them.

Lesson 01 · 18 min

Staged files to stored rows: what COPY INTO changes

Connect the Module 7 file preview to a real destination table and a deliberate loading workflow.

Explore lesson ↗
Lesson 02 · 22 min

Prepare the table and agree on column mapping

Create a destination that preserves unknown amounts and matches the source layout.

Explore lesson ↗
Lesson 03 · 24 min

Validate first: discover errors without inserting rows

Use a clean sample and a deliberately invalid amount to understand validation results.

Explore lesson ↗
Lesson 04 · 25 min

Your first COPY INTO: read every clause and result

Load the four clean orders and verify the exact stored values.

Explore lesson ↗
Lesson 05 · 20 min

Choose exactly which files belong to a load

Compare explicit file lists and patterns while preventing accidental cross-delivery loads.

Explore lesson ↗
Lesson 06 · 26 min

ON_ERROR: stop, skip the file or accept valid rows

Predict three different outcomes for a file containing two valid amounts and one invalid amount.

Explore lesson ↗
Lesson 07 · 24 min

Prove the load: counts, history and missing records

Combine table-level checks with recent COPY history instead of trusting one success message.

Explore lesson ↗
Lesson 08 · 25 min

Retry safely: file history is not order deduplication

Explain skipped replays, FORCE risks and a controlled plan for repairing partial loads.

Explore lesson ↗
Lesson 09 · 26 min

Simple load transformations and the complete hand-off

Map fields explicitly, preserve source metadata and finish with a complete loading scenario.

Explore lesson ↗

Success needs more than a completed command.

Did the expected files arrive? Which records did the load accept? Does the target contain the right orders and amounts? File inventory, load evidence and business reconciliation answer different parts of that story.

Explore the loading workflow →

Three exercises with clear starting points

The clean-file checks always refer to the first target. Optional experiments are labeled so their rows do not change the baseline you are learning to verify.

Official references

Consult the exact command and diagnostic references alongside the examples, especially when adapting the error or retry workflow.

Ready for continuous ingestion

Module 9 will introduce Snowpipe and continuous ingestion. Understanding one deliberate bulk load first makes automatic file processing easier to reason about.