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

Grant access, change configuration and retire an integration

Integration lifecycle management means controlling who can use it, changing settings deliberately and removing dependencies before retirement.

Understand the idea

An administrator can grant a builder role USAGE on the integration plus CREATE STAGE on the target schema. A reader of an existing external stage needs appropriate stage and parent-container access; do not assume every reader also needs permission to create integrations. File-format and warehouse permissions are separate.

Key ideas in simple English
ConceptWhat it means
USAGE ON INTEGRATIONAllows the role to reference the integration when creating stages.
USAGE ON STAGEAllows use of an existing external stage.
ALTERChanges configuration without blindly replacing the object.
DROPRemoves an integration definition and can break dependent workflows.

A concrete example

The role can use the listed Snowflake resources when all applicable grants exist. These statements do not modify AWS IAM.

Remember: Grant each permission at its own boundary; Snowflake SQL grants do not change cloud IAM.

Explain it step by step · full theory

Understand the idea

An administrator can grant a builder role USAGE on the integration plus CREATE STAGE on the target schema. A reader of an existing external stage needs appropriate stage and parent-container access; do not assume every reader also needs permission to create integrations. File-format and warehouse permissions are separate.

The examples use an existing lab role supplied by your administrator. Never paste a placeholder role name unchanged. For internal stages the privilege model differs: READ and WRITE apply, and READ must precede or accompany WRITE.

Follow the workflow

Disable or change only a disposable integration after documenting its dependent stages. Credential caching and in-flight work mean a configuration change should not be described as guaranteed instantaneous revocation of every already-issued cloud credential.

The cleanup block is optional and runs last. Drop the learning stage, then the integration if no other objects depend on it. Cloud IAM roles, grants and source files remain separate resources and need their own owner-approved cleanup.

Words used in this lesson
USAGE ON INTEGRATION
Allows the role to reference the integration when creating stages.
USAGE ON STAGE
Allows use of an existing external stage.
ALTER
Changes configuration without blindly replacing the object.
DROP
Removes an integration definition and can break dependent workflows.

See how it works

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

Open the interactive explanation
Interactive explainer1 / 3

Grant access, change configuration and retire an integration

Source files
Storage location

Locate the data

Integration lifecycle management means controlling who can use it, changing settings deliberately and removing dependencies before retirement.

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

    Integration lifecycle management means controlling who can use it, changing settings deliberately and removing dependencies before retirement.

  2. Configure the boundary

    An administrator can grant a builder role USAGE on the integration plus CREATE STAGE on the target schema. A reader of an existing external stage needs appropriate stage and parent-container access; do not assume every reader also needs permission to create integrations. File-format and warehouse permissions are separate.

  3. Observe the outcome

    Grant each permission at its own boundary; Snowflake SQL grants do not change cloud IAM.

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.

Builder and reader grants — administrator template

SQL · example
GRANT USAGE ON DATABASE L2_OBJECTS_LAB TO ROLE <lab_role>;
GRANT USAGE ON SCHEMA L2_OBJECTS_LAB.SALES TO ROLE <lab_role>;
GRANT CREATE STAGE ON SCHEMA L2_OBJECTS_LAB.SALES TO ROLE <lab_role>;
GRANT USAGE ON INTEGRATION m5_s3_read TO ROLE <lab_role>;
GRANT USAGE ON FILE FORMAT L2_OBJECTS_LAB.SALES.orders_csv_v1 TO ROLE <lab_role>;
-- After the external stage is created:
GRANT USAGE ON STAGE L2_OBJECTS_LAB.SALES.m5_external_stage TO ROLE <lab_role>;

What to expect and why

The role can use the listed Snowflake resources when all applicable grants exist. These statements do not modify AWS IAM.

Inspect and change a disposable integration

SQL · example
SHOW STORAGE INTEGRATIONS;
DESC INTEGRATION m5_s3_read;
ALTER STORAGE INTEGRATION m5_s3_read SET ENABLED=FALSE;
-- Re-enable only when continuing the lab:
ALTER STORAGE INTEGRATION m5_s3_read SET ENABLED=TRUE;

What to expect and why

This changes the integration enabled flag. Do not run it against a shared integration used by other pipelines.

Optional final cleanup

SQL · example
-- Only after completing the lab and checking dependencies:
DROP STAGE L2_OBJECTS_LAB.SALES.m5_external_stage;
DROP STORAGE INTEGRATION m5_s3_read;

What to expect and why

This removes the external-stage and integration definitions. It does not delete the S3 source files or the AWS IAM role.

Check your understanding

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

Will GRANT USAGE ON INTEGRATION update the cloud bucket policy?

Try it yourself

What should you inspect before dropping an integration?

Compare your reasoning

Find dependent stages and workloads, confirm ownership and a replacement or retirement plan, then clean up Snowflake and cloud resources separately.

Official sources and curriculum

Module 05 · See module scope