snowflake-semantic-views
Create, alter, and validate Snowflake semantic views via the CLI. Automate the generation, documentation, and testing of semantic layer definitions to ensure model accuracy and star schema compliance.
Introduction
This skill acts as a specialized assistant for data engineers and analytics developers working with Snowflake's semantic layer. It streamlines the lifecycle of semantic view management by integrating directly with the Snowflake CLI (snow). Users can leverage this skill to generate DDL for new semantic views, enhance existing ones, and perform rigorous validation before production deployment. By following a structured workflow that includes database introspection and star schema validation, the agent ensures that semantic models maintain high data quality and represent business logic effectively.
-
Automatically generates CREATE or ALTER SEMANTIC VIEW DDL based on provided fact and dimension tables.
-
Manages semantic metadata, including synonyms and business comments, by referencing existing Snowflake object comments or providing curated suggestions for user approval.
-
Performs live validation of generated DDL using the Snowflake CLI (snow sql) to catch syntax errors or structural issues before they impact the environment.
-
Follows a multi-step workflow including SELECT queries with DISTINCT and LIMIT to inspect data relationships and data types for accurate model definition.
-
Facilitates the use of temporary validation views (e.g., __tmp_validate) to safely test definitions without interfering with active production assets.
-
Supports querying and testing final semantic views using the specific SEMANTIC_VIEW() function syntax for verification.
-
Requires a functioning Snowflake environment with the Snowflake CLI installed and a pre-configured connection.
-
Employs a 'validate-first' strategy: never finalize DDL without successful CLI execution feedback.
-
Treat synonyms as informational; they do not replace formal object references in SQL definitions.
-
Prioritizes existing Snowflake column and table comments as the primary source of truth for semantic documentation.
-
Users must provide the target database, schema, role, and warehouse information to initiate any DDL generation task.
-
This agent is ideal for teams standardizing their semantic layer, reducing manual DDL drafting errors, and ensuring that semantic objects are fully documented with business-ready synonyms.
Repository Stats
- Stars
- 4
- Forks
- 0
- Open Issues
- 0
- Language
- Not provided
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 06:33 PM