Skip to main content

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.

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.

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:
  1. What it represents — the slice of your business the cube models.
  2. Measures — every numeric value you can ask for.
  3. Dimensions — every field you can group or filter by.
  4. Segments — predefined filters.
  5. Joins — which other cubes you can pull in.
  6. 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.

What this section is not

This is a reference for the semantic layer, not the underlying warehouse tables. If you’re looking for raw table schemas, those aren’t exposed — every query goes through a cube. If a measure or dimension you need is missing, request it from your Ocular account team rather than trying to query the warehouse directly.