Anaconda shared repository: Access role required to use Anaconda packages (Pending)

Attention

This behavior change is in the 2026_06 bundle.

For the current status of the bundle, refer to Bundle history.

Users must have the SNOWFLAKE.ANACONDA_REPOSITORY_USER database role to create or execute Python UDFs, UDTFs, UDAFs, and stored procedures that use packages from the shared Anaconda repository (SNOWFLAKE.SNOWPARK.ANACONDA_SHARED_REPOSITORY). Snowflake grants this database role to the PUBLIC role by default, so most accounts and users are not affected by this change.

For broader context on package sources for Python UDFs and stored procedures, see Using third-party packages.

Before the change:

Access to the shared Anaconda repository is not validated. Users can create and execute Python UDFs, UDTFs, UDAFs, and stored procedures that use packages from the shared Anaconda repository without holding a specific database role.

After the change:

Access to the shared Anaconda repository is validated on both creation and execution. Users must hold the SNOWFLAKE.ANACONDA_REPOSITORY_USER database role to create or execute Python UDFs, UDTFs, UDAFs, and stored procedures that use packages from the shared Anaconda repository. Snowflake grants this role to the PUBLIC role by default, so users in most accounts continue to work without any changes.

Users in an account without the required grant will see the following error when they create or execute an affected function or procedure:

SQL compilation error: Object 'snowflake.snowpark.anaconda_shared_repository' does not exist or not authorized.

How to update your code

Most users do not need to take any action. If you are in one of the following situations, grant the SNOWFLAKE.ANACONDA_REPOSITORY_USER database role to the roles that create or execute Python functions and procedures that use packages from the shared Anaconda repository:

  • Your account is configured to suppress default grants of database roles to PUBLIC, so the default grant of SNOWFLAKE.ANACONDA_REPOSITORY_USER to PUBLIC was not applied.

  • You previously revoked the SNOWFLAKE.ANACONDA_REPOSITORY_USER database role from PUBLIC in your account.

Grant the role to a specific role, or restore the grant to PUBLIC:

-- Grant to a specific role
GRANT DATABASE ROLE SNOWFLAKE.ANACONDA_REPOSITORY_USER TO ROLE my_role;

-- Or restore the default grant to PUBLIC
GRANT DATABASE ROLE SNOWFLAKE.ANACONDA_REPOSITORY_USER TO ROLE PUBLIC;

To verify that the grant was applied, list the roles that hold the database role:

SHOW GRANTS OF DATABASE ROLE SNOWFLAKE.ANACONDA_REPOSITORY_USER;

Ref: 2379