metricsign
Start free
High severityconfigurationSnowflake

Power BI Refresh Error:
003139

What does this error mean?

The storage integration linked to an external stage cannot be found. This typically happens when a storage integration is dropped and recreated using CREATE OR REPLACE STORAGE INTEGRATION — Snowflake stores the association by internal ID, not by name, so the stage loses its link.

Common causes

  • 1A storage integration was recreated using CREATE OR REPLACE STORAGE INTEGRATION, changing its internal ID
  • 2The storage integration was explicitly dropped without updating the stages that reference it
  • 3Terraform or IaC tooling replaced the storage integration resource, generating a new internal ID
  • 4The storage integration was renamed — Snowflake stages reference by ID, not by name
  • 5Cross-account or cross-region migration where the integration was recreated

How to fix it

  1. 1Re-link the stage to the (new) storage integration: ALTER STAGE <stage_name> SET STORAGE_INTEGRATION = <integration_name>.
  2. 2After recreating a storage integration, always update all stages that referenced the old one.
  3. 3Verify the fix: SHOW STAGES and check the storage_integration column.
  4. 4If using Terraform, add a lifecycle dependency so stages are updated after the integration is replaced.
  5. 5List affected stages: SELECT * FROM INFORMATION_SCHEMA.STAGES WHERE STORAGE_INTEGRATION IS NOT NULL.

Frequently asked questions

Why does CREATE OR REPLACE break the stage association?

Snowflake stages store the storage integration's internal UUID, not its name. CREATE OR REPLACE drops the old object and creates a new one with a new UUID — the stage's stored UUID becomes invalid.

Can I use ALTER STORAGE INTEGRATION instead of CREATE OR REPLACE?

Yes — for most changes (e.g., updating allowed locations), ALTER STORAGE INTEGRATION preserves the internal ID and keeps stage associations intact. Only use CREATE OR REPLACE when you need to change the integration type.

Official documentation: https://docs.snowflake.com/en/user-guide/data-load-bulk-ts

Other configuration errors