Module 08 · Lesson 2 of 12Detailed study · about 15 min

A pipe connects a file location to a table

A file-based pipe stores a COPY definition. Notifications or REST requests tell its managed ingestion service which files to process.

Understand the idea

Use a new incoming/m8/ prefix with no overlapping pipe. Reuse an approved Module 05 storage integration only when this path is allowed. Otherwise ask the administrator to scope a dedicated integration. Do not broaden production permissions for a lab.

Key ideas in simple English
ConceptWhat it means
Storage integrationPermission to read source objects.
StageSource URL and file access configuration.
Pipe ownerRole whose privileges allow loading.
AUTO_INGESTUses configured arrival notifications.

A concrete example

An event announces incoming/batch001.json. Snowflake still needs permission to read that file.

Remember: File access and notification access are separate boundaries.

Explain it step by step · full theory

Setup and reasoning

Use a new incoming/m8/ prefix with no overlapping pipe. Reuse an approved Module 05 storage integration only when this path is allowed. Otherwise ask the administrator to scope a dedicated integration. Do not broaden production permissions for a lab.

The pipe owner needs database/schema USAGE, schema CREATE PIPE, target INSERT and stage/file-format USAGE. Creating the external stage also needs schema CREATE STAGE and integration USAGE. Notification integration USAGE is additionally required where used. Grant SELECT and warehouse USAGE to the verification role; they are not a replacement for the pipe owner’s grants.

Words used in this lesson
Storage integration
Permission to read source objects.
Stage
Source URL and file access configuration.
Pipe owner
Role whose privileges allow loading.
AUTO_INGEST
Uses configured arrival notifications.

See how it works

Choose a step to explore the idea at your own pace.

Open the interactive explanation
Interactive explainer1 / 3

A pipe connects a file location to a table

Storage integration
Stage

Identify the input

A file-based pipe stores a COPY definition. Notifications or REST requests tell its managed ingestion service which files to process.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Identify the input

    A file-based pipe stores a COPY definition. Notifications or REST requests tell its managed ingestion service which files to process.

  2. Follow delivery

    An event announces incoming/batch001.json. Snowflake still needs permission to read that file.

  3. Verify and recover

    File access and notification access are separate boundaries.

Try the SQL or command

Read → predict → run in your learning environment → compare. You can also learn by reading without an account.

New to SQL? Where to run it and how to read it

A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.

  1. No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
  2. For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
  3. Read the entire example, including comments beginning with --. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor.
  4. Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
SELECT / FROM
Choose the values to return / identify their input.
VALUES / COLUMN1
VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
AS / WITH
AS gives a result a readable name. WITH names a temporary query step within one statement.
NULL / ::
NULL means missing or unknown. The :: notation converts a value to a named data type.
Session
One connection and its settings. Keep related transaction steps in the same session.
Database.schema.table
A full address for stored data. It is separate from the warehouse that processes queries.

Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →

Help with common practice errors
  • No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
  • Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
  • Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
  • Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.

Before running this lesson

Manual examples only. Complete Modules 05–07 and the first lesson’s M8_LAB setup. Select L2_OBJECTS_LAB.M8_LAB in each SQL session. Replace every placeholder and choose exactly one cloud provider. Cloud IAM/notifications require authorized setup; streaming protocol outlines are explicitly non-executable. No credentials belong in this website.

Template: choose one external provider

SQL · example
-- Replace the URL and existing storage integration for ONE provider.
CREATE STAGE M8_SOURCE
 URL='s3://<lab-bucket>/incoming/m8/'
 STORAGE_INTEGRATION=<approved_storage_integration>
 FILE_FORMAT=(FORMAT_NAME='M8_JSON');
-- Azure URL: azure://<account>.blob.core.windows.net/<container>/incoming/m8/
-- GCS URL: gcs://<bucket>/incoming/m8/
LIST @M8_SOURCE;

What to expect and why

The stage must point to the provider chosen in the next lesson. LIST checks file access, not notification delivery. An empty new prefix can legitimately list no files.

Check your understanding

Choose an answer, then check your reasoning. This is practice, not a scored test.

LIST works. Does that prove auto-ingest notifications work?

Try it yourself

Explain why a pipe can receive notifications but fail with access denied.

Compare your reasoning

The message carries a path, not the file bytes. Check stage/storage IAM and the pipe owner’s permissions independently.

Official sources and curriculum

Module 08 · See module scope