Syntax  ¶
    ALTER STAGE [ IF EXISTS ] <name> RENAME TO <new_name>
    ALTER STAGE [ IF EXISTS ] <name> SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ]
    ALTER STAGE <name> UNSET TAG <tag_name> [ , <tag_name> ... ]
    -- Internal stage
    ALTER STAGE [ IF EXISTS ] <name> SET
      { [ FILE_FORMAT = ( { FORMAT_NAME = '<file_format_name>' | TYPE = { CSV | JSON | AVRO | ORC | PARQUET | XML } [ formatTypeOptions ] } ) ]
        [ COPY_OPTIONS = ( copyOptions ) ]
        [ COMMENT = '<string_literal>' ] }
    -- External stage
    ALTER STAGE [ IF EXISTS ] <name> SET {
        [ externalStageParams ]
        [ FILE_FORMAT = ( { FORMAT_NAME = '<file_format_name>' | TYPE = { CSV | JSON | AVRO | ORC | PARQUET | XML } [ formatTypeOptions ] } ) ]
        [ COPY_OPTIONS = ( copyOptions ) ]
        [ COMMENT = '<string_literal>' ]
        }
Copy
Where:
>
>     externalStageParams (for Amazon S3) ::=
>       [ URL = 's3://<bucket>[/<path>/]' ]
>       [ { STORAGE_INTEGRATION = <integration_name> } | { CREDENTIALS = ( {
> { AWS_KEY_ID = '<string>' AWS_SECRET_KEY = '<string>' [ AWS_TOKEN =
> '<string>' ] } | AWS_ROLE = '<string>'  } ) } ]
>       [ ENCRYPTION = ( [ TYPE = 'AWS_CSE' ] [ MASTER_KEY = '<string>' ] |
>                        [ TYPE = 'AWS_SSE_S3' ] |
>                        [ TYPE = 'AWS_SSE_KMS' [ KMS_KEY_ID = '<string>' ] |
>                        [ TYPE = 'NONE' ] ) ]
>  
>
> Copy
>  
>  
>     externalStageParams (for Google Cloud Storage) ::=
>       [ URL = 'gcs://<bucket>[/<path>/]' ]
>       [ STORAGE_INTEGRATION = <integration_name> } ]
>       [ ENCRYPTION = ( [ TYPE = 'GCS_SSE_KMS' ] [ KMS_KEY_ID = '<string>' ]
> | [ TYPE = 'NONE' ] ) ]
>  
>
> Copy
>  
>  
>     externalStageParams (for Microsoft Azure) ::=
>       [ URL =
> 'azure://<account>.blob.core.windows.net/<container>[/<path>/]' ]
>       [ { STORAGE_INTEGRATION = <integration_name> } | { CREDENTIALS = ( [
> AZURE_SAS_TOKEN = '<string>' ] ) } ]
>       [ ENCRYPTION = ( [ TYPE = { 'AZURE_CSE' | 'NONE' } ] [ MASTER_KEY =
> '<string>' ] ) ]
>  
>
> Copy
>  
>  
>     formatTypeOptions ::=
>     -- If TYPE = CSV
>          COMPRESSION = AUTO | GZIP | BZ2 | BROTLI | ZSTD | DEFLATE |
> RAW_DEFLATE | NONE
>          RECORD_DELIMITER = '<character>' | NONE
>          FIELD_DELIMITER = '<character>' | NONE
>          FILE_EXTENSION = '<string>'
>          PARSE_HEADER = TRUE | FALSE
>          SKIP_HEADER = <integer>
>          SKIP_BLANK_LINES = TRUE | FALSE
>          DATE_FORMAT = '<string>' | AUTO
>          TIME_FORMAT = '<string>' | AUTO
>          TIMESTAMP_FORMAT = '<string>' | AUTO
>          BINARY_FORMAT = HEX | BASE64 | UTF8
>          ESCAPE = '<character>' | NONE
>          ESCAPE_UNENCLOSED_FIELD = '<character>' | NONE
>          TRIM_SPACE = TRUE | FALSE
>          FIELD_OPTIONALLY_ENCLOSED_BY = '<character>' | NONE
>          NULL_IF = ( '<string>' [ , '<string>' ... ] )
>          ERROR_ON_COLUMN_COUNT_MISMATCH = TRUE | FALSE
>          REPLACE_INVALID_CHARACTERS = TRUE | FALSE
>          EMPTY_FIELD_AS_NULL = TRUE | FALSE
>          SKIP_BYTE_ORDER_MARK = TRUE | FALSE
>          ENCODING = '<string>' | UTF8
>     -- If TYPE = JSON
>          COMPRESSION = AUTO | GZIP | BZ2 | BROTLI | ZSTD | DEFLATE |
> RAW_DEFLATE | NONE
>          DATE_FORMAT = '<string>' | AUTO
>          TIME_FORMAT = '<string>' | AUTO
>          TIMESTAMP_FORMAT = '<string>' | AUTO
>          BINARY_FORMAT = HEX | BASE64 | UTF8
>          TRIM_SPACE = TRUE | FALSE
>          NULL_IF = ( '<string>' [ , '<string>' ... ] )
>          FILE_EXTENSION = '<string>'
>          ENABLE_OCTAL = TRUE | FALSE
>          ALLOW_DUPLICATE = TRUE | FALSE
>          STRIP_OUTER_ARRAY = TRUE | FALSE
>          STRIP_NULL_VALUES = TRUE | FALSE
>          REPLACE_INVALID_CHARACTERS = TRUE | FALSE
>          IGNORE_UTF8_ERRORS = TRUE | FALSE
>          SKIP_BYTE_ORDER_MARK = TRUE | FALSE
>     -- If TYPE = AVRO
>          COMPRESSION = AUTO | GZIP | BROTLI | ZSTD | D