Why Semantic Models Matter
Modern organizations have data distributed across many systems—sales data in CRM platforms, marketing data in analytics tools, financial data in ERP systems. Each system often develops its own definitions and calculations for key metrics. A semantic model creates a unified business vocabulary by defining metrics, relationships, and business logic in one place, making it reusable across all data consumption patterns. The semantic layer acts as a data contract between data producers (engineering teams) and consumers (analysts, applications, AI agents). This contract provides semantic stability—when underlying systems evolve, the business definitions remain constant, allowing reports and applications to continue working without interruption. This enables organizations to iterate on their data infrastructure while maintaining consistency for end users.Core Components
Sources
Sources represent datasets enhanced with business logic. They serve as reusable building blocks that encapsulate both data structure and semantic meaning.Dimensions
Dimensions are scalar calculations that provide context for analysis—the “who, what, when, where” of your data. They represent categorical and descriptive attributes used for grouping and filtering. Common patterns include:- Derived fields: Calculations based on existing columns
- Categorization: Business logic creating meaningful groupings
- Date/time transformations: Extracting periods, formatting dates
Measures
Measures are aggregate calculations that produce business metrics—the “how many, how much” of your data. They operate across multiple rows to generate summary statistics. Standard aggregations includecount()
, sum()
, avg()
, min()
, max()
, and count(distinct)
. Complex measures can combine multiple aggregations or apply business logic.
Join Relationships
Joins define how sources connect, enabling analysis across related entities. Semantic models make relationships explicit with clear business meaning rather than implicit foreign key references. Relationship types:join_one
: One-to-one or many-to-one relationshipsjoin_many
: One-to-many relationshipsjoin_cross
: Cartesian products (used sparingly)
Views
Views define reusable analytical patterns and query templates. They can be embedded in sources for organization-wide reuse or defined inline for specific analysis. View operations include:- Reduction: Group and aggregate data
- Projection: Select specific fields
- Filtering: Apply business conditions
- Ordering: Sort results by importance
Filters
Filters are boolean expressions that restrict data to relevant subsets. They can be applied at multiple levels—source-wide, view-specific, or field-level—providing flexible data access patterns.Model Architecture
Semantic models transform the natural graph of all possible database joins into a curated semantic graph of meaningful business relationships. This curation process:- Eliminates ambiguity: Clear business meaning for each relationship
- Improves performance: Optimized join paths and pre-computed aggregations
- Enables governance: Centralized definitions and access controls
- Supports accessibility: Business users can explore data intuitively
Benefits of Semantic Modeling
Consistency: Business logic defined once, used everywhere across tools and applications Reusability: Components referenced across multiple analyses and consumption patterns Governance: Centralized definitions ensure data quality and regulatory compliance Performance: Optimized query generation and intelligent caching strategies Accessibility: Business users explore data through intuitive, self-service interfaces AI-Ready: Structured definitions enable AI agents to provide accurate, contextual responses This semantic foundation enables diverse consumption patterns—from traditional BI dashboards to embedded analytics to AI-powered insights—all working from the same trusted business definitions. The result is an organization that speaks a common data language, making decisions based on consistent, reliable information.Next Steps
- Learn about AI-assisted modeling to accelerate development
- Explore governed platform for enterprise deployment
- Review Malloy language reference for detailed implementation guidance