Module 05 · Lesson 9 of 15Detailed study · about 20 min

Storage integrations and the two permission systems

A storage integration is an account-level Snowflake object used to access approved external storage through a cloud identity. Cloud permissions and Snowflake privileges must both allow the operation.

Understand the idea

Think of a building with two doors. Snowflake permissions decide whether your role can use the stage; cloud permissions decide whether the integration identity can access the files. Opening only one door is not enough.

Key ideas in simple English
ConceptWhat it means
Cloud identityThe principal or role that storage recognizes.
IntegrationConnects that identity to allowed storage locations.
StageNames a location and references the integration.
Snowflake roleControls who can create or use Snowflake objects.

A concrete example

SHOW reports visible integration definitions. DESC exposes provider configuration; it does not establish that an actual file read will succeed. Replace the placeholder before running the last statement.

Remember: Validate both Snowflake privileges and provider permissions. A location allowlist alone cannot authorize the cloud identity.

Explain it step by step · full theory

Understand the idea

Think of a building with two doors. Snowflake permissions decide whether your role can use the stage; cloud permissions decide whether the integration identity can access the files. Opening only one door is not enough.

Using an integration avoids repeating long-lived cloud credentials in stage definitions for supported providers. Credential-based stages have different secret-management requirements. Do not paste real access keys into a lesson, repository or shared worksheet.

Follow the workflow

STORAGE_ALLOWED_LOCATIONS constrains which storage URLs stages may use. STORAGE_BLOCKED_LOCATIONS excludes sensitive subpaths within that boundary. These settings do not create bucket IAM permissions and do not grant users access to the integration.

An integration is account-level, while a named stage and file format live in a schema. Creating an integration needs CREATE INTEGRATION at account scope. Ordinary learners should use an approved integration or work with the administrator rather than defaulting to an administrative role.

Words used in this lesson
Cloud identity
The principal or role that storage recognizes.
Integration
Connects that identity to allowed storage locations.
Stage
Names a location and references the integration.
Snowflake role
Controls who can create or use Snowflake objects.

See how it works

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

Open the interactive explanation
Interactive explainer1 / 3

Storage integrations and the two permission systems

Source files
Storage location

Locate the data

A storage integration is an account-level Snowflake object used to access approved external storage through a cloud identity. Cloud permissions and Snowflake privileges must both allow the operation.

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. Locate the data

    A storage integration is an account-level Snowflake object used to access approved external storage through a cloud identity. Cloud permissions and Snowflake privileges must both allow the operation.

  2. Configure the boundary

    Think of a building with two doors. Snowflake permissions decide whether your role can use the stage; cloud permissions decide whether the integration identity can access the files. Opening only one door is not enough.

  3. Observe the outcome

    Validate both Snowflake privileges and provider permissions. A location allowlist alone cannot authorize the cloud identity.

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.
Shared orders.csv and internal-stage setup
Our shared source file

Four orders, one CSV contract

Every CSV lesson uses this fictional orders.csv. One data record represents one order. The first line is a header; the four remaining lines are data. All amounts use the same fictional currency.

order_id,customer_name,amount,order_date
101,"Asha, Rao",120.50,2025-01-01
102,Ben,,2025-01-02
103,Cara,NULL,2025-01-03
104,Dev,0,2025-01-04

Notice the comma inside Asha’s quoted name, Ben’s empty amount, Cara’s literal NULL marker and Dev’s zero. We will follow these exact values from file bytes to parsed fields.

Setup order for optional manual practice
  1. Select an authorized sandbox database and schema. Keep this context consistent across your client sessions.
  2. Create orders_csv_v1 using lesson 3, then orders_stage using lesson 5. Use fresh sandbox names; do not replace existing shared objects.
  3. Save the text above as a UTF-8 file named orders.csv. Upload it with a supported local client or the named-stage upload interface.
  4. Keep only this sample file under the incoming/ prefix when following the four-row expected results.
  5. Select an authorized warehouse for the staged SELECT examples. File previews use compute; this website runs no SQL.

The examples assume the required role privileges described in the lessons. The external-stage and JSON examples have their own additional setup and are clearly marked.

Before running this lesson

Manual learning examples, not executed here. Use L2_OBJECTS_LAB.SALES from Module 03 and an authorized warehouse for previews. Run shared format/stage setup once. Cloud examples are templates: replace every <placeholder>, use approved cloud resources, and follow the provider setup before running SQL. No credentials belong in this website.

Inspect the current identities and objects

SQL · example
SELECT CURRENT_ROLE(), CURRENT_DATABASE(), CURRENT_SCHEMA();
SHOW STORAGE INTEGRATIONS;
-- After an administrator provides an integration you can inspect:
DESC INTEGRATION <approved_integration>;

What to expect and why

SHOW reports visible integration definitions. DESC exposes provider configuration; it does not establish that an actual file read will succeed. Replace the placeholder before running the last statement.

Check your understanding

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

Is STORAGE_ALLOWED_LOCATIONS a replacement for bucket IAM?

Try it yourself

Name the three objects in the path from learner to files.

Compare your reasoning

The learner role uses a stage; the stage references a storage integration; the integration uses a cloud identity whose permissions cover the file location.

Official sources and curriculum

Module 05 · See module scope