Skip to Content

Model

Create a semantic model

Build and check reusable metrics, then publish them for your workspace.

Build and check reusable metrics, then publish them for your workspace.

New companies see Semantic Models in Data Studio. Companies that use Datamarts and Model status follow Create a datamart instead.

Before you start

  • You are an Admin. A role with the datamart Create permission can also create a model, but an Admin must assign it to a workspace before that person can edit it.
  • You have a connected datasource. To connect one, open Data Studio > Datasources > Connect data source. See Choose a connector.
  • To build with Bryn, your admin must connect an AI model.

Use a datasource connected to one database. Publish cannot save database-qualified table references.

Connecting a new datasource may open an empty model. If it does, continue at Choose how to build.

Create the model

  1. Open Data Studio > Semantic Models.
  2. Select New semantic model.
  3. Enter a Model name, up to 120 characters.
  4. Select the Data source.
  5. Select Create semantic model.
New semantic model dialog with Model name Revenue overview and the Product analytics PostgreSQL datasource selected
Name the model and pick one datasource. Several models can share a datasource.

The model opens with Build a model from your datasource. Choose Build my model, Pick tables or Paste YAML.

New semantic model in the studio with the Build a model from card and the Build my model, Pick tables and Paste YAML options
A new model opens on its start card. Nothing goes live until you publish.

If you are not an Admin, you see Semantic model created instead. Ask an Admin to assign the model to a workspace.

Choose how to build

Build manually if you want to define the first metric yourself. Then return to Check and publish. This path does not need an AI model.

Build with Bryn

  1. Select Build my model.
  2. Read the tables and metrics Bryn prepares.
  3. Answer any business question shown in Waiting for you.
  4. Review the definitions in Grid.

New models default to Auto. Bryn applies draft changes and runs checks. You still publish. Existing models default to Review each change. Review Bryn’s changes.

If no AI model is connected, your request stays in the inline setup form. Ask an admin to connect one. The request runs after the connection is ready.

Check and publish

  1. Open a metric in Grid.
  2. Select Run in Preview.
  3. Inspect the value and date range against your source data.
  4. Open Checks.
  5. Resolve each failed or missing check.
  6. Select Publish model.
  7. Review What goes live and the checks for this draft.
  8. Select Publish model in the confirmation, or Run checks first.

You see your model name and is live, with Open in workbook, Build a dashboard and Create a workspace. The header shows Published and the time. To undo, select Roll back the last publish. Bryn cannot publish the model for you.

Use the published model

The workbook opens in a workspace that uses the model. To make one, select Create a workspace on the is live card, or Create workspace on Home with Semantic model as the data.

  1. Open a metric in Grid, select Run in Preview, then select Open in workbook under the result.

    Collected revenue metric in the studio with the calculation Sum of amount in invoices by issued_on, and the Preview result 1,254,245.63 with the Open in workbook link highlighted.
    After a run, Preview shows the value and Open in workbook.
  2. Add the published metric to Measures if it is not already selected. Add a field to Dimensions to break it down, for example segment.

  3. Select Run metric. If results are already open, select Run.

    Workbook for the Billing records model with collected_revenue in Measures, the model's tables and metrics on the left, and the Run metric button highlighted.
    The workbook opens with the metric in Measures. Save to dashboard unlocks after the run.
  4. Select Save to dashboard.

    Workbook with accounts_segment in Dimensions and collected_revenue in Measures, a bar chart for Mid-market, SMB and Enterprise, and the Save to dashboard button highlighted.
    A field from a joined table follows the join path, here invoices to accounts.
  5. Choose the Workspace if prompted.

  6. Choose a Dashboard, or select New dashboard, enter a name and select Create.

  7. Enter the Metric title.

  8. Check the Metric ID.

  9. Select Save and add to dashboard.

    Save to dashboard dialog with Dashboard Billing overview, Metric title Collected revenue by segment, the Metric ID, and the Save and add to dashboard button highlighted.
    The Metric ID is filled from the title.

Your dashboard uses the published metric.

Billing overview dashboard with one Collected revenue by segment bar chart for the selected client.
With Table tenancy, the dashboard shows one client's rows. Pick the client at the top.

If a card shows Couldn’t load this metric and Details shows tenant_scope_unenforceable, set model access. Then refresh the dashboard.

If something goes wrong

  • Waiting for you: answer the business question or run the requested check. Your draft stays available.
  • Run again: the draft or customer scope changed. Run the metric in its current scope.
  • Publish is blocked: read the reason, for example Add a table to publish, No changes to publish, Data source is off or View only.
  • Publish cannot save database-qualified tables. Use a datasource connected to one database.
  • Enable this data source before creating a semantic model. Turn the datasource on in Data Studio > Datasources.
  • Workspace assignment required: ask a workspace admin to assign the new model before editing.

Next, edit model definitions to add another metric.

On this page