Make your app's data analyzable

The analytics.json contract — declare which of your App's own entities are analysable and where each column comes from, and the platform registers them as datasets in the tenant's Analytics Studio.

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 from vocabulary 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

analytics.json
{
  "$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