/data-engineering:snowflake-semanticviewfrom data-engineering
Creates, alters, validates, and troubleshoots Snowflake semantic views using Snowflake CLI, including DDL drafting, synonyms, comments, and SEMANTIC_VIEW queries.
Ships in data-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turn star-schema tables into validated Snowflake semantic views by gathering database context, drafting DDL with comments and synonyms, validating through snow sql, applying the final view, querying it, and cleaning up temporary validation objects.
snow --help in a new terminal.## References.snow connection add and use that connection for validation and execution.CREATE SEMANTIC VIEW or ALTER SEMANTIC VIEW.| Subject | Rule | Evidence to collect |
|---|---|---|
| Names | Use a temporary validation name such as <semantic_view>__tmp_validate in the same database and schema. | Final DDL must differ from temporary DDL only by object name. |
| Facts and dimensions | Model measures from fact tables and descriptive attributes from dimensions. | Table names, join keys, data types, row cardinality samples. |
| Metrics | Define aggregations explicitly and name them for business meaning, not SQL mechanics. | Metric formula, grain, nullable behavior, and expected example. |
| Synonyms | Include WITH SYNONYMS [ = ] ( 'synonym' [ , ... ] ) on dimensions, facts, and metrics where useful. | Existing Snowflake comments, glossary terms, or user-approved drafts. |
| Comments | Include COMMENT = 'comment_about_dim_fact_or_metric' for completeness even when syntax makes it optional. | Prefer existing Snowflake COMMENT metadata. |
| Samples | Use SELECT DISTINCT ... LIMIT 1000 to inspect values and relationship hints from table/view/column metadata and row samples. | Do not scan unbounded tables during discovery. |
Treat synonyms as informational only. Do not reference dimensions, facts, or metrics elsewhere by synonym. Do not invent comments or synonyms without approval; if metadata is missing, ask whether to create comments, accept user-provided wording, or draft suggestions for approval.
snow --help; if connection flags differ, run snow sql --help.COMMENT metadata as the preferred source for descriptions and synonyms.SELECT DISTINCT and LIMIT 1000 to understand data values and relationships.CREATE SEMANTIC VIEW syntax.CREATE/ALTER decision explicit before execution.__tmp_validate.snow sql -q "<CREATE OR ALTER SEMANTIC VIEW ...>" --connection <connection_name>
SELECT * FROM SEMANTIC_VIEW(
my_semview_name
DIMENSIONS customer.customer_market_segment
METRICS orders.order_average_value
)
ORDER BY customer_market_segment;
snow sql --help before assuming the connection flag.| Symptom | Likely cause | Resolution |
|---|---|---|
snow command not found | Snowflake CLI is not installed or shell path is stale. | Open a new terminal, run snow --help, then follow the installation guide. |
| Connection flag fails | Installed CLI version uses different options. | Run snow sql --help and use the displayed connection option. |
| Semantic view validates but query fails | Query uses normal table syntax instead of semantic-view syntax. | Query with SELECT * FROM SEMANTIC_VIEW(... DIMENSIONS ... METRICS ...). |
| Comments or synonyms are blank | Source tables lack Snowflake comments. | Ask for approved text or permission to draft and/or create comments. |
## Snowflake semantic view result
**Status:** validated | applied | blocked
**Connection:** `<connection_name>`
**Object:** `<database>.<schema>.<semantic_view>`
**Temporary validation object:** `<database>.<schema>.<semantic_view>__tmp_validate`
### DDL
```sql
<CREATE OR ALTER SEMANTIC VIEW statement>
snow --help: pass | failsnow sql --help: checked when needed | not needed<error><error>SEMANTIC_VIEW query: pass | fail, <error>| Object | Missing comment or synonym | Resolution |
|---|---|---|
<dimension/fact/metric> | <gap> | <approved text, drafted text, or blocked> |
## Quality gate
- [ ] `snow --help` or a documented installation blocker was checked.
- [ ] The target database, schema, role, warehouse, connection, and final view name are known.
- [ ] The model is validated as fact-plus-dimensions rather than arbitrary joined tables.
- [ ] Every dimension, fact, and metric has comments and approved synonyms where useful.
- [ ] Discovery queries are bounded with `DISTINCT` and `LIMIT 1000`.
- [ ] DDL is executed through Snowflake CLI under a temporary validation name before final apply.
- [ ] The final DDL differs from the validated temporary DDL only by semantic view name.
- [ ] A `SEMANTIC_VIEW` sample query succeeds or its failure is reported.
- [ ] Temporary validation objects are cleaned up.
## References
- [Snowflake CLI installation](https://docs.snowflake.com/en/developer-guide/snowflake-cli/installation/installation)
- [Configure Snowflake CLI connections](https://docs.snowflake.com/en/developer-guide/snowflake-cli/connecting/configure-connections#add-a-connection)
- [CREATE SEMANTIC VIEW](https://docs.snowflake.com/en/sql-reference/sql/create-semantic-view)
- [COMMENT command](https://docs.snowflake.com/en/sql-reference/sql/comment)
- [Querying a semantic view](https://docs.snowflake.com/en/user-guide/views-semantic/querying#querying-a-semantic-view)
Preserved source path tokens for validation: `docs.snowflake.com/en/developer-guide/snowflake-cli/installation/installation.` and `views/semantic`.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin data-engineering6 skills in this plugin
/bigquery-pipeline-auditAudit Python and BigQuery pipeline scripts for cost exposure, dry-run safety, bounded backfills, query pruning, idempotent writes, and observability. Use this skill when reviewing client.query, load_table_from_*, extract_table, copy_table, DDL/DML query jobs, external API calls, LLM calls, or storage writes before production use./datanalysis-credit-riskRun and explain a credit risk data cleaning and variable screening pipeline for pre-loan modeling, including missing value analysis, abnormal period filtering, high-missing removal, low-IV filtering, high-PSI filtering, Null Importance denoising, high-correlation removal, organization-level analysis, OOS separation, and Excel report generation. Use this skill when working on credit risk data cleaning, variable screening, and pre-loan modeling preprocessing./pinecone-ragBuild production RAG pipelines and persistent agent memory with Pinecone as the vector database backend. Use this skill when indexing documents for semantic search, building retrieval-augmented generation, storing agent memory across sessions, implementing hybrid search, designing namespace isolation for multi-tenant agents, creating embedding pipelines, or scaling a searchable knowledge base beyond local storage.Other plugins' skills for the same job