Back to Skills

snowflake-semanticview

Create, alter, and validate Snowflake semantic views using Snowflake CLI (snow). Use when asked to build or troubleshoot semantic views/semantic layer definitions with CREATE/ALTER SEMANTIC VIEW, to validate semantic-view DDL against Snowflake via CLI, or to guide Snowflake CLI installation and connection setup.

30,587stars3,654forksUpdated 4/21/2026

Security Assessment

Safe(93/100)
Security Score93/100

About snowflake-semanticview

This skill guides the assistant through creating, altering, and validating Snowflake semantic views using the official Snowflake CLI (snow). It solves the problem of building reliable semantic-layer definitions by enforcing a disciplined, validation-first workflow: rather than producing untested DDL, the assistant drafts CREATE/ALTER SEMANTIC VIEW statements, validates them against Snowflake via the CLI using a temporary name, iterates until they pass, and only then applies the final definition. It also provides one-time setup guidance for installing the Snowflake CLI and configuring a connection via snow connection add, pointing to official Snowflake documentation.

The workflow is thorough. It has the assistant confirm the target database, schema, role, warehouse, and view name, verify a star-schema model, and draft DDL from the official syntax. It requires populating synonyms and comments for every dimension, fact, and metric, preferring existing Snowflake column comments as the source and asking permission before inventing any. It uses read-only SELECT statements with DISTINCT and a LIMIT of at most 1000 rows to discover relationships and column types, validates DDL under a temporary name (for example a __tmp_validate suffix) to avoid clobbering the real view, runs a sample SEMANTIC_VIEW query to confirm behavior, and cleans up temporary objects afterward.

The target users are data engineers and analytics engineers building Snowflake semantic layers or metric definitions. Credential handling is delegated to the official Snowflake CLI connection configuration rather than being managed by the skill, and the emphasis on temporary validation names, LIMIT caps, and asking before creating comments reflects careful, low-risk data practices.

FAQ

What prerequisites are required?

The Snowflake CLI (snow) must be installed and a connection configured via snow connection add. The skill links to official Snowflake docs for installation and connection setup and treats these as one-time steps.

How are credentials handled?

Authentication is delegated to the official Snowflake CLI connection configuration. The skill uses the configured connection for validation and execution and does not manage or store credentials itself.

How does it avoid overwriting an existing view?

It validates DDL under a temporary name, such as appending a __tmp_validate suffix in the same database and schema, then applies the final DDL only after validation succeeds and cleans up the temporary object.

Does it query my actual data?

It runs read-only SELECT statements with DISTINCT and a LIMIT of at most 1000 rows to discover fact/dimension relationships and column types for building meaningful comments and synonyms.

Will it invent synonyms or comments?

No. It prefers existing Snowflake column comments as the source and asks whether it may create them, whether you want to provide text, or whether it should draft suggestions for approval before adding any.

Install snowflake-semanticview

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill