Site icon Noticias Levante –

How can I unset existing storage integration or credentials in Snowflake stag

I original built one Snowflake stage by using credentials.
CREATE OR REPLACE STAGE "TO_S3"."EXTERNAL_STAGES".AWS_STAGE
    URL = 'S3://xxx'
    CREDENTIALS = (AWS_ROLE = 'arn:aws:iam::xxx');

But now I like to use storage integration to replace the credentials. So I create one storage integration and SET this integration in my stage:

create or replace storage integration s3_int
    type = external_stage
    storage_provider = s3
    enabled = TRUE
    storage_aws_role_arn = 'arn:aws:iam::xxx'
    storage_allowed_locations = ('S3://xxx');

ALTER STAGE "TO_S3"."EXTERNAL_STAGES".AWS_STAGE SET STORAGE_INTEGRATION = s3_int;

But after SET integration into existing stage, how can I deal with the CREDENTIALS I initially gave? Do I need to DROP/UNSET it?

I actually tried to use UNSET to remove the credentials:

ALTER STAGE "TO_S3"."EXTERNAL_STAGES".AWS_STAGE UNSET CREDENTIALS

But it shows me the following error:

Unsupported feature 'UNSET'.

Why cannot I use UNSET in this case? Why it says the UNSET is not supported?

Thanks in advance!

Exit mobile version