Skip to main content

Virtual models

A virtual model is a semantic model that doesn't correspond to a physical table. Today Axiome supports one kind: flatten models, which turn a nested array-of-struct column into its own model.

Why flatten?

BigQuery schemas often nest data — an orders table with an items array, where each item has a sku, quantity, price… Nested like this, items can't be grouped or measured directly. Flattening orders.items creates a virtual order_items model where each array element becomes a row, joinable back to its parent order.

Creating a flatten model

In Semantic models, click Create model:

  1. Parent model — the model containing the nested array (e.g. orders).
  2. Array column — the array-of-struct column to flatten (e.g. items).
  3. Model name — the new model's name (no dots).
  4. Parent key — the parent column used to join back:
    • If the parent already has a primary key, the flatten model joins through it.
    • If not, the column you pick is declared as the parent's primary key at the same time.

The new model appears with a Virtual badge and a note like "Flattened from orders.items". It behaves like any other model: it gets generated dimensions and measures, and you can curate keys, descriptions, and metrics on it.

In widget editors, the original array shows a shortcut — "This array is flattened in the order_items model" — so users jump straight to the flattened fields.

The Create a flatten model dialog, with a parent model, an array column and the parent key selected.

Deleting a virtual model

Delete model permanently removes the virtual model and its customizations. Charts referencing it will stop resolving. Physical models can't be deleted — only reset — but virtual models can, since they exist only in the semantic layer.