cust_id in a table called tbl_ord_dtl and seeing Customer on an Order.
Core components
- Metrics — the numbers your business cares about, like revenue, customer count, or order volume, each defined once with clear business logic.
- Dimensions — the attributes you slice metrics by, such as time periods, regions, or product categories.
- Tables — the business objects (customers, orders, products) that hold your dimensions and support your metrics.
How it’s defined
You define the semantic layer in version-controlled YAML, either inside a dbt project or with Lightdash YAML if you don’t use dbt. Lightdash connects to your warehouse, reads these definitions, and generates optimized SQL at query time — handling joins, aggregations, and filters for you. Adding business-friendly labels, descriptions, and formatting turns technical fields into concepts the whole organization can use.Ways to use it
- In the app — explore metrics in the Metrics Catalog or query directly from tables.
- With AI — Lightdash AI agents answer natural-language questions using the same definitions and guardrails as your business users, and can propose writeback changes to your semantic layer.
- Programmatically — the API and Python SDK give you the semantic layer from code, for automation, scheduled reporting, or embedding.