DuckDB Semantic Views¶
The semantic layer for your
A Semantic Layer sits between your raw tables and the people querying them. Instead of everyone writing their own SUM(amount) and hoping they GROUP BY the same columns, you define each metric and dimension once, in one place. Analysts pick the ones they want; the system assembles the SQL.
Snowflake and Databricks, along with dbt Cloud, Cube.dev and others, all ship semantic layers in different forms. Snowflake has Semantic Views, Databricks calls them Metric Views, both as a SQL syntax sugar for a special kind of flexible view-like interface over aggregated metrics and dimensions. This extension brings the same idea to DuckDB, using DDL syntax modeled closely on Snowflake’s CREATE SEMANTIC VIEW.
Install the extension, create your first semantic view, and run a query in 5 minutes.
Model relationships between tables and query across them.
Facts, derived metrics, and iterative model refinement in 15 minutes.
Full syntax for CREATE SEMANTIC VIEW and related DDL.
Modeling, advanced metrics, data sources, materializations, YAML definitions, and more.
Feature-by-feature comparison with Snowflake’s CREATE SEMANTIC VIEW.