With the recent package upgrade we are no longer switching back to the default role to apply the migration in the METADATA database.
Examples:
Migration that uses the SECURITYADMIN role to create a custom role
-- Create Airflow role
-- Use SECURITYADMIN role
USE ROLE SECURITYADMIN;
CREATE ROLE IF NOT EXISTS AIRFLOW;
Fails with the following error
snowflake.connector.errors.ProgrammingError: 002003 (02000): SQL compilation error:
Database 'METADATA' does not exist or not authorize
However if I switch back to the SYSADMIN role at the end of the migration it will not fail and work as expected
-- Create Airflow role
-- Use SECURITYADMIN role
USE ROLE SECURITYADMIN;
CREATE ROLE IF NOT EXISTS AIRFLOW;
USE ROLE SYSADMIN;
From our CI pipeline, we are seeing it is not using the default warehouse being passed in as well when running the same migration. Not sure if this is something that recently changed with the snowflake-connector-
snowflake.connector.errors.ProgrammingError: 000606 (57P03): No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.
With the recent package upgrade we are no longer switching back to the default role to apply the migration in the METADATA database.
Examples:
Migration that uses the SECURITYADMIN role to create a custom role
Fails with the following error
However if I switch back to the SYSADMIN role at the end of the migration it will not fail and work as expected
From our CI pipeline, we are seeing it is not using the default warehouse being passed in as well when running the same migration. Not sure if this is something that recently changed with the snowflake-connector-