옵션
집 Skill 데이터베이스 관리 snowflake-semanticview

snowflake-semanticview

github/awesome-copilot github/awesome-copilot

Snowflake CLI(snow)를 사용하여 Snowflake 세마닉 뷰를 생성, 수정 및 검증할 수 있습니다. CREATE/ALTER SEMANTIC VIEW 명령을 통해 세마닉 뷰나 세마닉 레이어 정의를 구축하거나 문제를 해결해야 할 때, CLI를 통해 Snowflake에 대한 세마닉 뷰 DDL을 검증해야 할 때, 혹은 Snowflake CLI의 설치 및 연결 설정을 안내해야 할 때 이 도구를 활용할 수 있습니다.

...모든 것을 확장하십시오
17
업데이트 된 시간 2026년 8월 23일

Snowflake-semanticview에 대하여

이 스킬은 공식 Snowflake CLI(snow)를 활용해 Snowflake 세마닉 뷰를 생성, 수정, 검증하는 과정을 안내합니다. 체계적이고 검증 우선의 워크플로우를 적용함으로써 신뢰성 있는 세마닉 레이어 정의를 구축하는 문제를 해결합니다. 테스트되지 않은 DDL을 생성하는 대신, 애시스턴트는 CREATE/ALTER SEMANTIC VIEW 문을 작성한 뒤 임시 이름을 사용해 CLI를 통해 Snowflake에 대해 검증을 진행하고, 검증이 통과할 때까지 반복한 다음에야 최종 정의를 적용합니다. 또한 공식 Snowflake 문서를 참고하여 Snowflake CLI 설치 및 snow connection add를 통한 연결 설정에 대한 1회성 설정 가이드도 제공합니다.

이 워크플로우는 매우 체계적입니다. 애시스턴트는 대상 데이터베이스, 스키마, 롤, 웨어하우스, 뷰 이름을 확인하고 스타 스키마 모델을 검증한 뒤 공식 문법에 따라 DDL을 작성합니다. 각 차원, 팩트, 메트릭에 대해 동의어와 주석을 작성하도록 하며, 기존 Snowflake 컬럼 주석을 우선적으로 활용하고 새로운 주석을 만들기 전에 반드시 사용자의 허가를 구합니다. 관계와 컬럼 유형을 파악하기 위해 DISTINCT를 사용하고 행 수는 1000행 이하로 제한하는 읽기 전용 SELECT 문을 실행하며, 실제 뷰가 손상되지 않도록 임시 이름(예: __tmp_validate 접미사)으로 DDL을 검증합니다. 그 후 SEMANTIC_VIEW 쿼리를 실행해 동작 여부를 확인하고 임시 객체들을 정리합니다.

주요 사용자는 Snowflake 세마닉 레이어나 메트릭 정의를 구축하는 데이터 엔지니어와 애널리틱스 엔지니어입니다. 자격 증명 관리는 이 스킬이 아닌 공식 Snowflake CLI 연결 설정을 통해 이루어지며, 임시 검증 이름 사용, LIMIT 제한, 주석 작성 전 허가 요청 등은 신중하고 위험도가 낮은 데이터 관리 방식을 반영합니다.

FAQ

필요한 사전 조건은 무엇인가요?

Snowflake CLI(snow)가 설치되어 있어야 하며, snow connection add를 통해 연결이 설정되어 있어야 합니다. 이 스킬은 설치 및 연결 설정에 대한 가이드로 공식 Snowflake 문서를 참조하며, 이 단계들은 1회만 수행되는 작업으로 간주됩니다.

자격 증명은 어떻게 관리되나요?

인증은 공식 Snowflake CLI 연결 설정을 통해 처리됩니다. 이 스킬은 검증 및 실행 시 설정된 연결을 사용할 뿐, 자격 증명을 직접 관리하거나 저장하지 않습니다.

기존 뷰가 덮어쓰이는 것을 어떻게 방지하나요?

동일한 데이터베이스와 스키마 내에 __tmp_validate와 같은 접미사를 붙여 임시 이름으로 DDL을 검증한 뒤, 검증이 성공한 경우에만 최종 DDL을 적용하고 임시 객체를 정리합니다.

실제 데이터를 조회하나요?

의미 있는 주석과 동의어를 만들기 위해 DISTINCT를 사용하고 행 수는 1000행 이하로 제한하는 읽기 전용 SELECT 문을 실행하여 팩트/차원 간의 관계와 컬럼 유형을 파악합니다.

동의어나 주석을 자동으로 생성하나요?

아닙니다. 기존 Snowflake 컬럼 주석을 우선적으로 활용하며, 새로운 주석이나 동의어를 만들기 전에 사용자의 허가를 구하고 텍스트 제공을 요청하거나 승인을 위한 제안을 먼저 작성합니다.

GitHub에서 보기

One-Time Setup

  • Verify Snowflake CLI installation by opening a new terminal and running snow --help.
  • If Snowflake CLI is missing or the user cannot install it, direct them to https://docs.snowflake.com/en/developer-guide/snowflake-cli/installation/installation.
  • Configure a Snowflake connection with snow connection add per https://docs.snowflake.com/en/developer-guide/snowflake-cli/connecting/configure-connections#add-a-connection.
  • Use the configured connection for all validation and execution steps.

Workflow For Each Semantic View Request

  1. Confirm the target database, schema, role, warehouse, and final semantic view name.
  2. Confirm the model follows a star schema (facts with conformed dimensions).
  3. Draft the semantic view DDL using the official syntax:
    • https://docs.snowflake.com/en/sql-reference/sql/create-semantic-view
  4. Populate synonyms and comments for each dimension, fact, and metric:
    • Read Snowflake table/view/column comments first (preferred source):
      • https://docs.snowflake.com/en/sql-reference/sql/comment
    • If comments or synonyms are missing, ask whether you can create them, whether the user wants to provide text, or whether you should draft suggestions for approval.
  5. Use SELECT statements with DISTINCT and LIMIT (maximum 1000 rows) to discover relationships between fact and dimension tables, identify column data types, and create more meaningful comments and synonyms for columns.
  6. Create a temporary validation name (for example, append __tmp_validate) while keeping the same database and schema.
  7. Always validate by sending the DDL to Snowflake via Snowflake CLI before finalizing:
    • Use snow sql to execute the statement with the configured connection.
    • If flags differ by version, check snow sql --help and use the connection option shown there.
  8. If validation fails, iterate on the DDL and re-run the validation step until it succeeds.
  9. Apply the final DDL (create or alter) using the real semantic view name.
  10. Run a sample query against the final semantic view to confirm it works as expected. It has a different SQL syntax as can be seen here: https://docs.snowflake.com/en/user-guide/views-semantic/querying#querying-a-semantic-viewExample:
SELECT * FROM SEMANTIC_VIEW(    my_semview_name    DIMENSIONS customer.customer_market_segment    METRICS orders.order_average_value)ORDER BY customer_market_segment;
  1. Clean up any temporary semantic view created during validation.

Synonyms And Comments (Required)

  • Use the semantic view syntax for synonyms and comments:
WITH SYNONYMS [ = ] ( 'synonym' [ , ... ] )COMMENT = 'comment_about_dim_fact_or_metric'
  • Treat synonyms as informational only; do not use them to reference dimensions, facts, or metrics elsewhere.
  • Use Snowflake comments as the preferred and first source for synonyms and comments:
    • https://docs.snowflake.com/en/sql-reference/sql/comment
  • If Snowflake comments are missing, ask whether you can create them, whether the user wants to provide text, or whether you should draft suggestions for approval.
  • Do not invent synonyms or comments without user approval.

Validation Pattern (Required)

  • Never skip validation. Always execute the DDL against Snowflake with Snowflake CLI before presenting it as final.
  • Prefer a temporary name for validation to avoid clobbering the real view.

Example CLI Validation (Template)

# Replace placeholders with real values.snow sql -q "<CREATE OR ALTER SEMANTIC VIEW ...>" --connection <connection_name>

If the CLI uses a different connection flag in your version, run:

snow sql --help

Notes

  • Treat installation and connection setup as one-time steps, but confirm they are done before the first validation.
  • Keep the final semantic view definition identical to the validated temporary definition except for the name.
  • Do not omit synonyms or comments; consider them required for completeness even if optional in syntax.

모든 파일

0개 파일

snowflake-semanticview 설치

해당 스킬 파일들을 다운로드하여 .claude/skills/ 디렉토리에 압축을 풀어 저장해 주세요.

ZIP 다운로드

저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.

git clone https://github.com/github/awesome-copilot/blob/main/skills/snowflake-semanticview/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

복사 복사
빠른 설정: 스킬 폴더를 .claude/skills/로 복사하면, Claude가 자동으로 해당 스킬을 인식하여 사용합니다.

관련 스킬

microservices-patterns
업데이트 된 시간 2026년 6월 29일
jpa-patterns
업데이트 된 시간 2026년 6월 30일
fabric-lakehouse
업데이트 된 시간 2026년 6월 30일
prisma-expert
업데이트 된 시간 2026년 6월 29일
OR