Before writing a CREATE VIEW 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 VIEW IF NOT EXISTS. - Add the SECURE keyword only when the user explicitly needs to restrict access to the view definition (e.g. hiding business logic from non-privileged users).
- Use TEMPORARY/TEMP/VOLATILE only when the view is needed for session-scoped intermediate work; it will be dropped automatically at session end.
- Use RECURSIVE only when the SELECT statement needs to reference the view itself (self-referencing query); provide an explicit column list when RECURSIVE is used.
- Enable CHANGE_TRACKING = TRUE only when the user needs to create a stream on this view or track row-level changes.
- Views share the namespace with tables — a view and a table cannot have the same name within a schema.
- The SELECT statement is limited to 95 KB; all columns derived from expressions must be given explicit aliases.