DuckDB Semantic Views
Overview
Tutorials
Getting Started
Install the extension and run your first query in 5 minutes
Multi-Table Semantic Views
Model multi-table schemas with relationships
How-To Guides
FACTS
Define reusable row-level expressions referenced in metrics
Derived Metrics
Compose metrics from other metrics using arithmetic
Role-Playing Dimensions
Join the same table multiple times with distinct aliases
Fan Traps
Detect and resolve aggregation inflation from one-to-many joins
Data Sources
Connect CSV, Parquet, Iceberg, and database tables to semantic views
Metadata Annotations
Add comments, synonyms, and access modifiers to view definitions
Semi-Additive Metrics
Define snapshot metrics with NON ADDITIVE BY for balances and inventory
Window Metrics
Define rolling averages, lag comparisons, and rankings with OVER clauses
Wildcard Selection
Select all items for a table alias using alias.* patterns
Query Facts
Query facts directly as row-level columns without aggregation
Materializations
Route matching queries to pre-aggregated tables
YAML Definitions
Export and import semantic view definitions as YAML
Explanation
Semantic Views vs Regular Views
What semantic views add beyond standard SQL views
Snowflake Comparison
Feature comparison with Snowflake SQL DDL semantic views
Databricks Comparison
Feature comparison with Databricks metric views
Reference
Release notes
/
Index