Engineering
snowflake-semanticview avatar

snowflake-semanticview

Create, alter, and validate Snowflake semantic views using the Snowflake CLI.

Introduction

The snowflake-semanticview skill is a specialized agent designed to streamline the management of semantic layers within Snowflake. It allows data engineers and analysts to programmatically define, update, and test semantic views directly from their development environment using the Snowflake CLI (snow). By enforcing a standardized workflow that includes structural validation against live data, the agent minimizes configuration errors and ensures that semantic definitions remain consistent with the underlying database schema. Whether you are building new star-schema models or troubleshooting existing semantic-layer DDL, this agent acts as a guardrail to ensure all DDL operations are verified before final deployment.

  • Automates the drafting of CREATE and ALTER SEMANTIC VIEW statements based on existing Snowflake database objects.

  • Integrates with Snowflake CLI to perform real-time SQL execution and DDL validation, preventing deployment of broken configurations.

  • Enforces strict adherence to metadata requirements, such as requiring synonyms and comments for dimensions, facts, and metrics to ensure semantic clarity.

  • Supports systematic discovery of table relationships and column data types through automated SELECT queries for enhanced documentation.

  • Facilitates safe experimentation by implementing a temporary validation naming pattern that avoids conflicts with production views.

  • Ensure the Snowflake CLI is properly installed and that a connection is configured using snow connection add before beginning.

  • Always define target databases, schemas, roles, and warehouses before generating code to ensure context-aware SQL generation.

  • The agent prefers existing Snowflake comments as the primary source of truth; if missing, it will prompt for user input to create or suggest new documentation.

  • Use the provided validation workflow to execute temporary semantic views before applying changes permanently to production environments.

  • Input requirements include table definitions, schema details, and the intended semantic model structure; output is ready-to-execute SQL DDL or validated CLI commands.

  • Note that this tool treats synonyms as informational metadata only and does not use them for programmatic referencing, maintaining a clear separation between documentation and functional SQL identifiers.

Repository Stats

Stars
31,750
Forks
3,845
Open Issues
50
Language
Python
Default Branch
main
Sync Status
Idle
Last Synced
Apr 30, 2026, 11:00 AM
View on GitHub