
Semantic Layer Specification & Validation
Define and validate semantic layers with intelligent schema mapping
What You Can Do
You can create well-structured semantic layer specifications that define business metrics, dimensions, and relationships from your raw data schemas. This skill validates your semantic layer design for consistency, identifies naming issues, detects redundancy, and generates comprehensive documentation and data dictionaries that keep your entire team aligned.
Features
automatically extract tables, columns, and relationships into structured definitions
ensure business logic is correctly defined and all relationships are consistent
detect and suggest fixes for non-compliant naming patterns across your entire semantic model
map primary/foreign key constraints and inferred relationships between tables
produce comprehensive markdown or YAML documentation with business definitions
spot duplicate metrics, unmapped tables, and denormalization candidates
generate YAML, JSON, or markdown specifications compatible with dbt, LookML, and semantic tools
Example Output
Example 1: Semantic Layer Specification
metrics:
- name: total_revenue
definition: SUM(orders.amount) WHERE orders.status = 'completed'
description: Total value of completed orders
dimensions: [order_date, customer_segment, product_category]
dimensions:
- name: order_date
type: time
column: orders.created_at
- name: customer_segment
type: categorical
column: customers.segment
Example 2: Validation Report
✓ 15 metrics validated successfully
⚠ 3 warnings:
- 'customer_id' used in 2 different fact tables
- Missing description for 3 dimensions
✗ 2 errors: dimension 'region' references undefined table
Recommendations:
- Consolidate customer_id across fact tables
- Add English descriptions for new dimensions
Example 3: Data Dictionary
## Metric: total_monthly_revenue
**Business Definition:** Sum of all completed order amounts aggregated by month
**Owner:** Analytics Team
**Update Frequency:** Daily
**Dimensions:** Month, Product Category, Customer Segment
**Related Metrics:** revenue_by_product, customer_acquisition_cost
What's Included
- SKILL.md: Complete semantic layer specification and validation workflows
- Semantic Layer Template: YAML/JSON template for defining metrics and dimensions
- Validation Checklist: Quality gates for semantic specifications
- Naming Convention Guide: Reference guide for metric and dimension naming standards
- Data Dictionary Template: Markdown template for auto-generated documentation
- Schema Analysis Workflow: Step-by-step process for extracting semantics from raw data
Who It's For
- Data Architects — Design well-structured semantic layers for enterprise data platforms
- Analytics Engineers — Build validated, documented metrics that teams trust and use consistently
- Business Analysts — Define metrics and dimensions aligned with business logic and strategy
- Data Engineers — Ensure semantic specifications accurately reflect physical schema reality
- BI Developers — Create maintainable semantic models compatible with your reporting stack
Best For
- Defining company-wide metrics and KPIs — Create a single source of truth for how business metrics are calculated across all teams
- Documenting data models — Generate comprehensive, up-to-date data dictionaries directly from your schemas
- Validating semantic quality — Catch naming inconsistencies, missing definitions, and logic errors before deployment
- Planning data warehouse reorganization — Analyze current semantic layers to identify consolidation and optimization opportunities
- Standardizing metrics across platforms — Align metric definitions when integrating Looker, dbt, Tableau, or other semantic tools







