Ocular exposes your data through a semantic layer rather than raw database tables. You query named entities (cubes) with predefined measures and dimensions, not SQL against underlying tables. This page explains the building blocks so the per-cube reference pages make sense.Documentation Index
Fetch the complete documentation index at: https://docs.ocular.dev/llms.txt
Use this file to discover all available pages before exploring further.
Why a semantic layer
Raw tables change shape over time, require deep schema knowledge, and force every team to re-derive the same metrics. The semantic layer fixes definitions in one place — “revenue”, “orders”, “unique customers” mean the same thing across every dashboard, report, and ad-hoc query. You query the model, not the warehouse.Building blocks
Cube
An entity you can query — for example, Sales, Customer Activity, Fulfilment. Each cube is a logical view of one part of your business.
Measure
A numeric value the cube can compute —
total_revenue, order_count, aov. Measures are aggregations; you don’t sum them yourself.Dimension
A field you can group or filter by —
order_date, marketing_channel, country. Dimensions slice measures.Segment
A named, reusable filter —
repeat_customers, paid_traffic_only. Apply a segment instead of rewriting the same WHERE clause.Join
A defined relationship between two cubes — lets you query measures from one cube sliced by dimensions of another (e.g. revenue by ad campaign).
Time dimension
A dimension you can roll up by day, week, month, or quarter — used for all time-series analysis.
How to read a cube reference page
Each cube in this section follows the same structure:- What it represents — the slice of your business the cube models.
- Measures — every numeric value you can ask for.
- Dimensions — every field you can group or filter by.
- Segments — predefined filters.
- Joins — which other cubes you can pull in.
- Example queries — common questions answered by this cube.
Available cubes
Sales
Orders, revenue, AOV, refunds.
Customer Activity
New vs. repeat customers, cohorts, retention.
Fulfilment
Shipments, delivery status, RTOs, returns.
