Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
Snowflake · SnowPro Core

File Formats and Stages

SnowPro Core · Lesson 15 of 27 · 1:49:22

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

Learning with these videos? Subscribe for new courses and exam-style questions.

In this lesson

Prepare for the SnowPro Core Certification exam (COF-C03). In this lesson: file formats, user, table, and named internal stages, external stages and encryption, and directory tables. Follows Foxglove Apparel, a fictional online clothing retailer. Includes three original practice questions.

Study notes

The text of this lesson, to read at your own pace. Information as of November 2026.

Files waiting to be loaded

Every night, Foxglove's warehouse system drops order files as CSV, the web team exports click events as JSON, and suppliers send product sheets as PDF. Before any of this can be loaded, the files must sit in a stage, and Snowflake must know their format. This lesson covers file formats, and the different kinds of stages.

File formats

A file format describes the files to load or unload: CSV, JSON, Avro, ORC, Parquet, or XML. Despite its name, CSV covers any delimited text, with options such as the field delimiter, the number of header lines to skip, and how to read empty fields. A named file format is a schema-level object that many loads can reuse, and format options can also be set on a stage, or directly in the COPY command. For loading performance, Snowflake recommends files of roughly one hundred to two hundred and fifty megabytes compressed, so aggregate small files, and split large ones.

Internal stages

Internal stages keep files inside Snowflake, and the PUT command uploads files to them from a client. Each user has a user stage, referenced as at tilde, for files that one user loads into several tables, and it cannot be altered or dropped. Each table has a table stage, referenced as at percent followed by the table name, for files that several users load into that one table, and it has no privileges of its own. A named internal stage is a database object, and the most flexible option: anyone with privileges on it can load its files into any table.

External stages

An external stage points to files in your own cloud storage: an Amazon S3 bucket, a Google Cloud Storage bucket, or an Azure container. A storage integration lets the stage authenticate through an identity from the cloud provider, without storing secret keys in the stage itself. Data in archival storage classes, which must be restored before it can be read, cannot be accessed. And files on external stages can be encrypted by the cloud provider, for example with keys managed by S3, or with K M S.

Internal stage encryption

Internal stages have two encryption types, chosen when the stage is created, and never changed afterwards. SNOWFLAKE_FULL, the default, encrypts files on the client before the upload, and again on the server, and it is the type that Tri-Secret Secure requires. SNOWFLAKE_SSE encrypts files only on the server side, when they arrive, and you need it if you plan to use pre-signed URLs for staged files. With PUT, files are encrypted with a one hundred and twenty-eight bit key by default, or a two hundred and fifty-six bit key if you change a client parameter.

Directory tables

A directory table is an implicit object layered on a stage, internal or external, which stores file-level metadata, such as the size, the last modified time, and the URL of each file. You enable it on the stage with the DIRECTORY option, and you query it with the DIRECTORY function, like a table. Its metadata must be refreshed, manually with ALTER STAGE and REFRESH, or automatically through cloud event notifications. Directory tables are the starting point for unstructured data, such as Foxglove's product photos and supplier PDFs, covered in lesson twenty-three.

Working with staged files

LIST shows the files in a stage, and REMOVE deletes them. GET downloads files from an internal stage to a client, the reverse of PUT. You can also query staged files directly, with a SELECT that refers to columns by position, for example to check a file before loading it. And to load staged files into a table, you use COPY INTO, the subject of the next lesson.

Recap

Let's recap. File formats describe CSV, JSON, Avro, ORC, Parquet, or XML files, and files of one hundred to two hundred and fifty megabytes compressed load best. User stages serve one user, table stages serve one table, and named stages are the flexible option, with grantable privileges. External stages point to cloud storage, ideally through a storage integration. Internal stages use full encryption by default, or server-side encryption for pre-signed URLs. And directory tables keep file metadata, refreshed by hand or by event notifications.

Quick checks for this lesson

The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.

  1. Three Foxglove analysts upload supplier price files, which are loaded into several different tables, and the team wants to control access to the files through roles. Which stage fits?

    • Each analyst’s user stage
    • The table stage of the prices table
    • A temporary stage in each session
    • A named internal stage
    Show the answer

    A named internal stage

    A named stage is a database object, so privileges on it can be granted to roles, and its files can go into any table. “Each analyst’s user stage” would keep each file visible to a single user. “The table stage of the prices table” serves a single table, and it has no privileges of its own to grant. And “A temporary stage in each session” would disappear at the end of each session.

  2. Foxglove wants to give suppliers temporary links to product sheets stored on a new internal stage, as pre-signed URLs. Which encryption type should the stage use?

    • SNOWFLAKE_FULL
    • SNOWFLAKE_SSE
    • AWS_SSE_KMS
    • AWS_CSE with a master key
    Show the answer

    SNOWFLAKE_SSE

    Server-side encryption is the type to choose for pre-signed URLs, and it must be set when the stage is created. “SNOWFLAKE_FULL” also encrypts files on the client side, which does not suit pre-signed URLs. “AWS_SSE_KMS” is an encryption type for external stages on S3, not for internal stages. And “AWS_CSE with a master key” is client-side encryption for S3 buckets, not for an internal stage either.

  3. Foxglove’s catalog team wants a SQL list of all the product photos on its S3 stage, with each file’s size and last modified time, kept up to date as files arrive. What should it use?

    • An external table over the photos
    • LIST on the stage, run by hand
    • A directory table with automatic refresh
    • A named file format for the photos
    Show the answer

    A directory table with automatic refresh

    A directory table stores each file's metadata, and event notifications keep it refreshed as files arrive. “An external table over the photos” is meant for rows of data inside files, not for image files. “LIST on the stage, run by hand” would have to be run by hand each time, and it does not give a table to query. And “A named file format for the photos” only describes how to parse files, and it lists nothing.