Features

Semantic Datasets

A dataset is a reusable semantic layer over one or more tables — you name the dimensions, metrics, and filters once, and every chart, dashboard, and NL→SQL query builds on them without re-writing SQL.

Why a semantic layer

Raw tables don’t know which columns are things to group by and which are things to measure. A dataset encodes that intent once: dimensions (categories, dates), metrics (aggregations), and filterable columns. Charts then reference the dataset, and Kaveon generates the correct SELECT, JOIN,GROUP BY, and aggregation for you.

Anatomy of a dataset

PartStored inPurpose
Fact table + joinsdatasetsThe base table and any related tables to join
Dimensionsdataset_dimensionsGroup-by columns (strings, dates)
Metricsdataset_metricsAggregations — e.g. SUM(total), COUNT(*), AVG(price)
Columnsdataset_columnsThe resolved column list used for filters and previews

Creating a dataset

  1. Go to Datasets → + New Dataset and pick a data source.
  2. Choose a fact table; add related tables and their join keys if you need more than one.
  3. Mark each column as a dimension or a metric (with its aggregation).
  4. Preview, then save. It’s now available to every chart and the NL→SQL engine.

Automatic SQL generation

When a chart requests dimensions and metrics, the query_generator service assembles the star-schema SQL — selecting the dimensions, applying each metric’s aggregation, generating the JOINs from the dataset definition, and grouping/ordering appropriately.

sql
-- "revenue by region" against a dataset with
-- dimension: region   metric: SUM(total) AS revenue
SELECT   d.region, SUM(f.total) AS revenue
FROM     fact_orders f
JOIN     dim_region  d ON d.id = f.region_id
GROUP BY d.region
ORDER BY revenue DESC;
Role-playing dimensions (the same lookup used in multiple roles, e.g. order-date vs ship-date) are handled with COALESCE-based resolution so each role maps to the right join without duplicating the dataset.

Visibility

Datasets — like charts and dashboards — carry a visibility level: private (only you), internal (signed-in users), or published. Combined with the role model (see Auth & RBAC), this controls who can discover and build on each dataset.