Before writing a CREATE PIPE statement:
- Read
references/parameters.mdto 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 useCREATE PIPE IF NOT EXISTS. - The
AS <copy_statement>clause is required; always generate a validCOPY INTO <table> FROM @<stage>statement as part of the pipe definition. AUTO_INGEST = TRUEis required for fully automated Snowpipe ingestion from external stages; it requires cloud event notification setup (SQS for S3, Pub/Sub for GCS, Azure Event Grid for Azure).- For S3 auto-ingest, include
AWS_SNS_TOPICwith the ARN of the SNS topic configured on the source bucket. - For GCS or Azure auto-ingest, include
INTEGRATIONreferencing a notification integration. ERROR_INTEGRATIONis optional but recommended for production pipelines to route load errors to a notification channel.- Do not combine
OR REPLACEandIF NOT EXISTSin the same statement — they are mutually exclusive.