# The map

> The Semantic model page draws your tables as cards and your relationships as lines. Arrange it, select tables and open the panels around it.

The Semantic model page opens on the map. Each table you have put on the semantic model is a card, each relationship is a line between two cards, and everything else (metrics, aliases, filters and so on) opens from a rail of panels, which stands down the left or folds up into one row along the top. The map is a picture of the semantic model, not a separate thing: every card and line on it exists in the semantic model, and every change you make on it changes the semantic model.

Open it from **Intelligence · Semantic model**, or [open Semantic model](https://console.sanda-os.com.au/app/semantic) directly.

![The semantic map: five table cards, three of them joined by lines, with the rail of panels on the left and the zoom controls on the right.](https://docs.sanda-os.com.au/media/the-map-overview.png "The map, with the rail on the left, the zoom controls on the right and the legend at the bottom.")

The whole workspace shares one map. When someone drags a card, everyone else opens the board with that card in its new place.

## What is on the page

![The top of the Semantic model page: the Build a view button, the Map and List switch, the Ask Sam to learn button, and the query semantic model bar.](https://docs.sanda-os.com.au/media/the-map-header.png "The page header and the workbench bar.")

Above the map you have:

- **Build a view.** Takes you to [Data · Modelling](https://docs.sanda-os.com.au/modelling/views), where you build views that can then be put on the map.
- **Map** and **List.** Two views of the same semantic model. The list is for precise edits the map does not offer. See [the list view](#the-list-view).
- **Ask Sam to learn.** Asks Sam to read your warehouse and propose a model. See [Learn from my data](https://docs.sanda-os.com.au/semantic-model/learn).
- **query semantic model.** A bar with an **open** button that opens the workbench over the map. See [Query the semantic model](https://docs.sanda-os.com.au/semantic-model/query-the-model).

On the map itself you have the rail (down the left, or folded into a row along the top), the zoom controls on the right, and a legend at the bottom right once there is a line to read.

## Reading a card

A card is one table.

- **The header** carries the table's name and its relation (for example `mapping.billing__invoices`). The coloured dot on the left is the table's dataset. The **fact** or **dim** badge says whether Sanda treats the table as something that happened or something that is. The chevron shows or hides the columns.
- **The columns** list each column's name in code style. Key columns come first, then the event time, then the rest in table order. A card shows twelve columns and a **+N more columns** link for the rest.
- **The tags** beside a column say what the semantic model knows about it: **key**, **time**, **values** (it has value labels), **dim** (a dimension is built on it) and `⋈ customer` (it carries a relationship key). A category shows as a chip.
- **The metrics strip** at the foot lists up to four metrics measured on the table, with their units.
- **modelled** appears under the name of a table that is a view you built yourself, not one a sync landed. Its link opens the view in Modelling.
- **2 summaries** (or however many) appears under the name of a table that has [summaries](https://docs.sanda-os.com.au/modelling/summaries): smaller copies of its numbers that reports read when they give the same answer. Its link opens them in **Data · Modelling**. A summary is never a card of its own.

If the map has five tables or fewer, every card opens with its columns showing. With more, cards start collapsed, showing a one-line summary of columns, metrics and grain.

![A table card for invoices, with its columns, tags and metrics strip.](https://docs.sanda-os.com.au/media/the-map-card.png "One card: header, columns with tags, and the metrics measured on the table.")

Hover over a column and a small tag icon appears. It opens a dialog where you give the column a name, other words people use for it, and any categories. See [naming rules](https://docs.sanda-os.com.au/semantic-model/naming#aliases) and [dimensions and filters](https://docs.sanda-os.com.au/semantic-model/dimensions-and-filters#categories).

## Move around

- **Pan** by dragging the empty canvas.
- **Zoom** with the plus and minus buttons. The map runs from 25% to 250%, and the current level shows beneath the buttons. The mouse wheel scrolls the page and does not zoom the map.
- **Fit to content** (the arrows button) frames every card in the room the rail leaves.

While the board is where fit to content left it, it stays framed: fold or unfold the rail, open Sam beside the page, or resize the window, and the map frames itself again for the space it now has. Once you pan or zoom, it stays where you put it.

## Move a card

Drag a card by its header. A dashed outline shows where it will land: cards snap to a grid, and a card dropped on top of another is moved clear of it, so no table can be hidden under another. Drag to the edge of the map and it scrolls to follow you. The new position is saved for everyone.

## Tidy the map

Once the map has more than one table, the four squares button, **arrange by relationships**, lays out every card by how the tables join. Tables that join others are placed from a hub outward: the fact table with the most joins sits in the middle, its neighbours to the left and right, and lookups (usually dimensions) on the outside. Tables that join nothing sit in a grid underneath, grouped by dataset.

The layout is fitted to the map's window. A long chain of joined tables would be one row far wider than the window, shown small, so it folds into rows instead: left to right, then back right to left underneath, with each row's first table directly below the last table of the row above. Every join stays between neighbouring tables, and where a row turns, the join is a short line from one card down to the one below it. Sanda picks the number of rows that lets the map show the cards largest, and keeps a single row when that already fits.

It replaces your own arrangement, and only positions change. No table's kind, dataset or columns are touched. The same layout always comes out for the same semantic model in the same size of window.

A map still laid out in the single long row that arranging used to make is tidied to fit the window the first time it opens, and saved for everyone. A map anyone has arranged by hand since (a card moved, a table opened or renamed) is never moved for you.

When there are joins to show and cards that have never been arranged, a tip appears beside the button: **See how your tables join**. Press the button, or dismiss the tip with its cross. The tip comes back when a learn pass adds new tables.

## Select tables

- Click a card to select it. A ring shows the selection, and a strip at the foot of the map says what is selected.
- Hold <kbd>Shift</kbd> (or <kbd>⌘</kbd>) and click to add a card to the selection or take it out.
- Click empty canvas, or press <kbd>Escape</kbd>, to clear it.
- Press <kbd>Delete</kbd> to take the selected tables off the map. Sanda asks first, naming them, with **remove** and **cancel**. See [taking a table off the map](https://docs.sanda-os.com.au/semantic-model/tables#take-a-table-off-the-map).

Escape undoes one layer at a time: a confirmation, then a dialog, then an open panel, then a selected line, then the card selection. Delete does nothing while you are typing in a field or while a panel is open.

## Relate two tables

Drag from a column on one card onto a column on another. Columns whose types would join without a cast light up while you drag, and the others dim. Dropping opens a dialog to name the relationship and say which end holds one row. Click any line to see what it is and to unlink it. See [relationships](https://docs.sanda-os.com.au/semantic-model/relationships).

## The rail

Each card on the rail opens a panel over the middle of the canvas, and the map behind it does not move. The rail stays above the panel, so you go from one panel to the next in one press.

**hide the panels**, at the top of the rail, folds it up into one row of icons along the top of the map, each with its count, so the cards have the width of the canvas. Hover over an icon for its name. The double chevron at the start of the row unfolds it again. Your choice is remembered in this browser; a map with no tables yet opens with the names showing.

| Card | Opens | Read more |
|---|---|---|
| **suggestions** | Everything Sanda has proposed and is waiting on you. Shown only when something is waiting. | [Review what Sanda proposes](https://docs.sanda-os.com.au/semantic-model/review) |
| **new table** | The picker for adding tables from your warehouse | [Tables and datasets](https://docs.sanda-os.com.au/semantic-model/tables) |
| **datasets** | Groups of tables, and the colour each paints on the map | [Tables and datasets](https://docs.sanda-os.com.au/semantic-model/tables#datasets) |
| **relationships** | Every join, with which end holds one row | [Relationships](https://docs.sanda-os.com.au/semantic-model/relationships) |
| **aliases** | What your team calls each table and column | [Naming rules](https://docs.sanda-os.com.au/semantic-model/naming#aliases) |
| **categories** | One word for a way of slicing, over many columns | [Dimensions and filters](https://docs.sanda-os.com.au/semantic-model/dimensions-and-filters#categories) |
| **metrics** | What your numbers mean | [Metrics](https://docs.sanda-os.com.au/semantic-model/metrics) |
| **filters** | Named conditions | [Dimensions and filters](https://docs.sanda-os.com.au/semantic-model/dimensions-and-filters#named-filters) |
| **glue** | Joins between two source systems | [Relationships](https://docs.sanda-os.com.au/semantic-model/relationships#join-two-source-systems) |

Each card shows a count of what it holds. The counts for aliases, metrics and filters leave out suggestions, so a card never says you have eleven aliases when you have three and eight suggestions.

Every panel has a search box in the same place. Selecting a card on the map does not narrow a panel's list, so clicking a card to look at it never empties the panel you open next. Press <kbd>Escape</kbd>, the cross, or the shaded canvas to close a panel.

## The list view

Press **List** for the same semantic model as lists. There is a tab for each of **mappings**, **metrics**, **dimensions**, **categories**, **filters** and **tables**, each with an add form and a list of what exists. The pencil on a row opens the form on that row's current values, and typing a name that already exists fills the form in the same way, so saving corrects the row rather than blanking what you left empty. Use it for what the map does not offer: value labels, join keys typed by hand, dimensions and their roll-ups, and a table's grain, key and event time.

In the list view, the **Add tables** button opens the same picker as the **new table** card, and suggestions wait in a panel headed **N waiting on you** rather than on the rail.

## An empty map

A workspace with nothing on its map says so. If a learn pass has left suggestions, the message counts them and offers **review the suggestions**. If nothing has been proposed, it offers **add tables from my warehouse**.

## Keep going

:::links
- [Tables and datasets](https://docs.sanda-os.com.au/semantic-model/tables): Put tables on the map and group them.
- [Relationships](https://docs.sanda-os.com.au/semantic-model/relationships): Join tables and set which end holds one row.
- [Query the semantic model](https://docs.sanda-os.com.au/semantic-model/query-the-model): Ask a question from the map.
:::
