Before writing a CREATE SERVICE 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 SERVICE IF NOT EXISTS. - Always include
IN COMPUTE POOLwith the appropriate compute pool name. - Choose the correct specification variant: use
FROM SPECIFICATIONfor inline or stage-referenced YAML specs, orFROM SPECIFICATION_TEMPLATEwhen the user provides template variables viaUSING. - Set
AUTO_SUSPEND_SECSonly when the user wants automatic suspension; the minimum effective value is 300 seconds (0 disables it). - Set
MAX_INSTANCESexplicitly when horizontal scaling beyond 1 instance is needed. - Include
QUERY_WAREHOUSEonly when service containers will run Snowflake queries.