Before writing a CREATE TABLE 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 TABLE IF NOT EXISTS. - Choose the correct table type: permanent (default), TRANSIENT (no Fail-safe, lower cost), or TEMPORARY/TEMP/VOLATILE (session-scoped, dropped at session end). Default to permanent unless the user implies otherwise.
- For CTAS (CREATE TABLE … AS SELECT), omit column definitions when the SELECT list already provides unambiguous names and types.
- Use CLUSTER BY only for very large (multi-terabyte) tables where the chosen clustering key matches common filter/join patterns — do not add it speculatively.
- Enable CHANGE_TRACKING = TRUE only when the user explicitly needs CDC or stream support on the table.
- Set DATA_RETENTION_TIME_IN_DAYS only when the user specifies a non-default retention window; the platform default is 1 day.
- Apply MASKING POLICY, ROW ACCESS POLICY, AGGREGATION POLICY, or TAG clauses only when the user explicitly requests governance controls.