| name | snowflake-create-external-stage |
| description | Consult Snowflake CREATE STAGE parameter reference before generating any CREATE STAGE DDL for external stages. |
Before writing a CREATE STAGE statement for an external stage:
- Read
references/parameters.md to review all available parameters and their defaults.
- For each parameter, decide whether the user's request implies a non-default value.
- Include only the parameters that differ from the default or that the user explicitly requested — do not bloat the DDL with unnecessary clauses.
- Never use
CREATE OR REPLACE — always use CREATE STAGE IF NOT EXISTS.
- Always include the required
URL parameter for external stages pointing to the correct cloud storage path (s3://, gcs://, or azure://).
- Prefer
STORAGE_INTEGRATION over inline CREDENTIALS for authentication — it is more secure and avoids embedding secrets in DDL.
- If the user provides raw credentials (AWS keys, SAS tokens), emit them but add a comment recommending migration to a storage integration.
- Choose the encryption type appropriate to the cloud provider (AWS_SSE_S3, AWS_SSE_KMS, GCS_SSE_KMS, AZURE_CSE, etc.) only if the user explicitly requests encryption configuration.
- Enable the DIRECTORY table only when the user needs to query staged files via directory table functions.