Syntax  ¶
    -- Internal stage
    CREATE [ OR REPLACE ] [ { TEMP | TEMPORARY } ] STAGE [ IF NOT EXISTS ] <internal_stage_name>
        internalStageParams
        directoryTableParams
      [ FILE_FORMAT = ( { FORMAT_NAME = '<file_format_name>' | TYPE = { CSV | JSON | AVRO | ORC | PARQUET | XML } [ formatTypeOptions ] } ) ]
      [ COPY_OPTIONS = ( copyOptions ) ]
      [ COMMENT = '<string_literal>' ]
      [ [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] ) ]
    -- External stage
    CREATE [ OR REPLACE ] [ { TEMP | TEMPORARY } ] STAGE [ IF NOT EXISTS ] <external_stage_name>
        externalStageParams
        directoryTableParams
      [ FILE_FORMAT = ( { FORMAT_NAME = '<file_format_name>' | TYPE = { CSV | JSON | AVRO | ORC | PARQUET | XML } [ formatTypeOptions ] } ) ]
      [ COPY_OPTIONS = ( copyOptions ) ]
      [ COMMENT = '<string_literal>' ]
      [ [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] ) ]
Copy
Where:
>
>     internalStageParams ::=
>       [ ENCRYPTION = (TYPE = 'SNOWFLAKE_FULL' | TYPE = 'SNOWFLAKE_SSE') ]
>  
>
> Copy
>  
>  
>     externalStageParams (for Amazon S3) ::=
>       URL = { 's3://<bucket>[/<path>/]' | 's3gov://<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' ] [ MASTER_KEY = '<string>' ] |
> [ TYPE = 'NONE' ] ) ]
>  
>
> Copy
>  
>  
>     externalStageParams (for Amazon S3-compatible Storage) ::=
>       URL = 's3compat://{bucket}[/{path}/]'
>       ENDPOINT = '<s3_api_compatible_endpoint>'
>       [ { CREDENTIALS = ( AWS_KEY_ID = '<string>' AWS_SECRET_KEY =
> '<string>' ) } ]
>  
>
> Copy
>  
>  
>     directoryTableParams (for internal stages) ::=
>       [ DIRECTORY = ( ENABLE = { TRUE | FALSE }
>                       [ REFRESH_ON_CREATE =  { TRUE | FALSE } ] ) ]
>  
>
> Copy
>  
>  
>     directoryTableParams (for Amazon S3) ::=
>       [ DIRECTORY = ( ENABLE = { TRUE | FALSE }
>                       [ REFRESH_ON_CREATE =  { TRUE | FALSE } ]
>                       [ AUTO_REFRESH = { TRUE | FALSE } ] ) ]
>  
>
> Copy
>  
>  
>     directoryTableParams (for Google Cloud Storage) ::=
>       [ DIRECTORY = ( ENABLE = { TRUE | FALSE }
>                       [ AUTO_REFRESH = { TRUE | FALSE } ]
>                       [ REFRESH_ON_CREATE =  { TRUE | FALSE } ]
>                       [ NOTIFICATION_INTEGRATION =
> '<notification_integration_name>' ] ) ]
>  
>
> Copy
>  
>  
>     directoryTableParams (for Microsoft Azure) ::=
>       [ DIRECTORY = ( ENABLE = { TRUE | FALSE }
>                       [ REFRESH_ON_CREATE =  { TRUE | FALSE } ]
>                       [ AUTO_REFRESH = { TRUE | FALSE } ]
>                       [ NOTIFICATION_INTEGRATION =
> '<notification_integration_name>' ] ) ]
>  
>
> Copy
>  
>  
>     formatTypeOptions ::=
>     -- If TYPE = CSV
>          COMPRESSION = AUTO | GZIP | BZ2 | BROTLI | ZSTD | DEFLATE |
> RAW_DEFLATE | NONE
>          RECORD_DELIMITER = '<character>' | NONE
>          FIELD_