Make your app's data analyzable
analytics.json
The contract
Where the file lives, its public JSON Schema, its relationship to schema.json, and what happens at deploy.
Declaring a view
The view fields, flattening columns and relations, and the dataset name that gets emitted.
Column locators
The full `from` vocabulary — columns, attributes, relations, references and computed values.
Semantic roles
time, entity, measures and dimensions — what each one unlocks, and the fallback when you omit them.
Tenant isolation
Views are tenant-scoped and cannot opt out — and what that means for what you may expose.
Example
A complete analytics.json walked line by line.
If you are building an App, you can declare which of your own tables are analysable and how. The platform compiles those declarations into datasets in the tenant's Analytics Studio, so an operator can chart and segment your app's data alongside the platform's own — without you building any reporting UI.
This is the only part of Analytics Studio with a public, versioned contract. Everything else in this section is either a platform service you consume or a Cockpit surface you look at.
You declare what is analysable and where each column comes from. You never write SQL, and you never configure isolation or storage.
The pages
- The contract — where the file sits, the published JSON Schema to point your editor at, how it relates to
schema.json, and what deploying does. - Declaring a view — every field of a view, what flattening means, and the dataset name the platform emits.
- Column locators — the
fromvocabulary in full, with the exact forms each locator takes. - Semantic roles — the four roles, what each unlocks in the studio, and the type heuristic that runs when you leave them out.
- Tenant isolation — why a view can only ever return the querying tenant's rows, and what you should still not put in one.
- Example — a complete file, walked line by line.
The shape of it
{
"$schema": "https://schemas.revenexx.com/analytics.schema.json",
"version": "1",
"views": [
{
"name": "locations",
"source": "locations",
"columns": [
{ "name": "location_id", "from": "column:id", "type": "uuid", "optional": false }
]
}
]
}
One App ships one analytics.json, declaring one or more flat views over the entities in its schema.json. Start with The contract.
Where to go next
- Apps — the App model this belongs to.
- What the tenant sees — where your declared views show up.
- Deploy with the CLI — the deploy that picks the file up.