Files reach Snowflake through a stage, a place files wait to be loaded:
- Internal stages: your user stage
@~, a table's stage @%orders, or a named stage @landing. Upload files to them with PUT from SnowSQL or a driver.
- External stages point at cloud storage you own: S3, Google Cloud Storage or Azure.
COPY INTO loads staged files into a table:
COPY INTO raw.orders
FROM @landing/orders/
FILE_FORMAT = (TYPE = CSV SKIP_HEADER = 1)
ON_ERROR = CONTINUE;
A file format describes the files: CSV, JSON, Parquet, Avro, ORC or XML. ON_ERROR decides what bad rows do; the default for COPY stops the whole load. Snowflake remembers which files it has loaded for 64 days and skips them, unless you add FORCE = TRUE.
For files that arrive all day, Snowpipe loads each one within minutes of it landing, on serverless compute. This lesson covers loading decisions. The stages and COPY lessons that follow run local file fixtures and check the rows loaded.