The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
docs - data apps updates (#85984)
Jeff Bruemmere1eabd5219cd
diff --git a/docs/README.md b/docs/README.mdindex 2a837ca19a0..9378f9f31e0 100644--- a/docs/README.md+++ b/docs/README.md@@ -127,6 +127,7 @@ Metabase's reference documentation.### Data apps- [Data apps overview](./data-apps/start.md)+- [Getting started with data apps](./data-apps/getting-started.md)- [Build a data app](./data-apps/build.md)- [Manage data apps](./data-apps/manage.md)@@ -148,8 +149,9 @@ Metabase's reference documentation.### Actions-- [Actions overview](./data-modeling/models/actions/start.md)-- [Introduction to actions](./data-modeling/models/actions/introduction.md)+- [Data actions](./data-modeling/data-actions.md)+- [Model actions](./data-modeling/models/actions/start.md)+- [Introduction to model actions](./data-modeling/models/actions/introduction.md)- [Basic actions](./data-modeling/models/actions/basic.md)- [Custom actions](./data-modeling/models/actions/custom.md)diff --git a/docs/ai/agent-driven-development.md b/docs/ai/agent-driven-development.mdindex 0f86d3a03c7..8d89a32eef1 100644--- a/docs/ai/agent-driven-development.md+++ b/docs/ai/agent-driven-development.md@@ -146,6 +146,7 @@ Since the agent uses the CLI to create content directly in Metabase, to undo cha- [Remote Sync](../data-modeling/semantic-layer/remote-sync.md)- [Metabase CLI](../installation-and-operation/metabase-cli.md)+- [Data apps](../data-apps/start.md): custom apps that your agent builds on your semantic layer, and ships with Remote Sync.- [Metabase Representation Format](https://github.com/metabase/representations)- [Agent skills](https://github.com/metabase/agent-skills)- [MCP server](./mcp.md): for agents that need live metadata lookups outside the agent-driven workflow.diff --git a/docs/dashboards/actions.md b/docs/dashboards/actions.mdindex fc931f56c69..c4a12124216 100644--- a/docs/dashboards/actions.md+++ b/docs/dashboards/actions.md@@ -54,9 +54,9 @@ To connect an action field to a filter on a dashboard:While you can add actions to dashboards and use them in your Metabase, actions won't work on dashboards accessed via [public links](./introduction.md#sharing-dashboards-with-public-links), or dashboards in guest embeds.-If you want people outside of your Metabase to use an action, you can create a [public form for an action](../data-modeling/models/actions/custom.md#make-public), or expose actions via [modular embedding](../embedding/modular-embedding.md) with SSO or [full app embedding](../embedding/full-app-embedding.md).+If you want people outside of your Metabase to use an action, you can share a [data action as a public form](../data-modeling/data-actions.md#share-a-data-action-as-a-public-form), or expose actions via [modular embedding](../embedding/modular-embedding.md) with SSO or [full app embedding](../embedding/full-app-embedding.md).## Further reading-- [Actions](../data-modeling/models/actions/start.md)+- [Model actions](../data-modeling/models/actions/start.md)- [Editable tables](../data-modeling/editable-tables.md)diff --git a/docs/data-apps/build.md b/docs/data-apps/build.mdindex 3989af58ee8..57268caa5ba 100644--- a/docs/data-apps/build.md+++ b/docs/data-apps/build.md@@ -11,84 +11,89 @@ summary: Data apps are custom apps that an AI coding agent builds on your semant{% include plans-blockquote.html feature="Data apps" is_plural=true %}-Data apps are custom apps that you build on your Metabase data. Like a dashboard, a data app shows charts and tables from your [semantic layer](../data-modeling/semantic-layer/library.md). But an app isn't limited to cards and filters on a grid: an app can have its own layout, its own pages, and forms that add, edit, or delete rows in your database. An app doesn't have to write data: an app can just show data, from any database. You can build apps like portals, review queues, and forms, without having to stand up a separate app and backend.+Data apps are custom apps that you build on your Metabase data. Like a dashboard, a data app shows charts and tables from your [semantic layer](../data-modeling/semantic-layer/library.md). But an app isn't limited to cards and filters on a grid: an app can have its own layout, its own pages, and forms that add, edit, or delete rows in your database. You can build apps like portals, review queues, and forms, without having to stand up a separate app and backend.-A data app runs with the permissions of the person who opens it, so people see only the data that they're allowed to see. And an app can read only from your semantic layer and its own collection, and it can write data only through the actions in its own collection. See [what a data app can read and write](#what-a-data-app-can-read-and-write).+A data app runs with the permissions of the person who opens it, so people see only the data that they're allowed to see. An app can write data only through the actions in its own collection. See [what a data app can read and write](#what-a-data-app-can-read-and-write).-## How data apps work--You build and change data apps on your computer, with an AI coding agent and a development Metabase. Then you commit the app to your Remote Sync repository, pull the app into your production Metabase, and choose who can open the app.--Your agent does most of the work, but here's an overview of the end-to-end process:--1. On your development Metabase, create a [Remote Sync](../data-modeling/semantic-layer/remote-sync.md) branch for the app, and clone your Remote Sync repository to your computer.-2. Describe the app to an AI coding agent, like Claude Code or Codex, on your computer. For example: "Create a Metabase data app to add, update, and delete products from the products table."-3. The agent uses the [Metabase CLI](../installation-and-operation/metabase-cli.md) to create the app on your development Metabase. The agent saves the questions and actions that the app runs to the [app's collection](#what-a-data-app-can-read-and-write).-4. The agent writes the app's code in your local clone of your Remote Sync repository. While the agent works, you [preview the app](#preview-the-app-on-your-computer) in your browser.-5. The agent builds the app and uploads it to your development Metabase. Admins can open the app there at `/apps/<slug>`.-6. Push the app from your development Metabase to your branch, and commit the app's source code to the same branch.-7. Merge the branch, and pull the changes into your production Metabase.-8. On your production Metabase, [choose which groups can open the app](./manage.md#choose-who-can-open-an-app).+This page is the reference for data apps. To set up your tools and build your first app step by step, check out [Getting started with data apps](./getting-started.md).## Requirements for data apps- A Pro or Enterprise plan.-- An admin account. Only admins can create and manage apps.+- An admin account. Only admins can build and manage apps.- An AI coding agent, like Claude Code or Codex.-- The [Metabase CLI](../installation-and-operation/metabase-cli.md) (`mb`).+- The [Metabase CLI](../installation-and-operation/metabase-cli.md) (`mb`), version 0.5.10 or later. To update the CLI, run `mb upgrade`.- Node.js 22.12 or later on your computer.-- A development Metabase, connected to your data warehouse, where you build and change your apps.-- [Remote Sync](../data-modeling/semantic-layer/remote-sync.md), to ship your apps from your development Metabase to production. Your Remote Sync repository also keeps each app's source code.-- A [semantic layer](../data-modeling/semantic-layer/library.md) with the [published tables](../data-modeling/semantic-layer/published-tables.md) and metrics that your apps read. Your agent can publish tables and create metrics while it builds an app. But for apps that people rely on, use tables and metrics that you trust.-- If your apps write data, [actions enabled](../data-modeling/models/actions/introduction.md#enabling-actions-for-a-database) on the databases that your apps write to. An app that only shows data doesn't need actions, so the app can read from any database that Metabase connects to, even a database that doesn't support actions.+- A Git repository that your Metabases connect to with [Remote Sync](../data-modeling/semantic-layer/remote-sync.md), and permission to push to it. Apps get into Metabase only when Metabase pulls them from the repository, and the repository also keeps each app's source code.+- A Metabase where your agent builds each app. See [Choose where to build apps](#choose-where-to-build-apps).+- A [semantic layer](../data-modeling/semantic-layer/library.md) with the [published tables](../data-modeling/semantic-layer/published-tables.md) and metrics that your apps read. Your agent can publish tables and create metrics on a Metabase in Read-write mode while it builds an app.+- If your apps write data, a PostgreSQL or MySQL database with [data actions turned on](../data-modeling/data-actions.md#turn-on-data-actions-for-a-database). Only these databases support actions. An app that only shows data can read from any database that Metabase connects to.++## Choose where to build apps++Your agent builds and ships each app from a Metabase that it logs in to. You can set this up in two ways:++- **A development Metabase and a production Metabase (recommended).** Set up two Metabases: one for trying things out, and one for the content that people rely on. Your agent builds each app on the development Metabase, where it can also publish tables and create metrics for the app. You review the app before it reaches production. To set this up, connect both Metabases to the same Git repository with [Remote Sync](../data-modeling/semantic-layer/remote-sync.md): your development Metabase in Read-write mode, and your production Metabase in Read-only mode.+- **Only your production Metabase.** This setup has fewer steps, but each change that your agent ships goes to production without review. [Getting started with data apps](./getting-started.md) uses this setup.++The rest of this page uses a development Metabase and a production Metabase.## What a data app can read and writeA data app runs with the permissions of the person who opens it. Their [data permissions](../permissions/data.md), including [row and column security](../permissions/row-and-column-security.md), apply to everything the app reads. If row and column security applies to a person on any table in a database, that person can't run the app's actions on that database.-An app can read only:+An app can read:-- [Published tables](../data-modeling/semantic-layer/published-tables.md), with their [segments](../data-modeling/semantic-layer/segments.md) and [measures](../data-modeling/semantic-layer/measures.md). The app can query these tables directly, without a saved question, but not with SQL.-- The metrics and dashboards in your [Library](../data-modeling/semantic-layer/library.md).-- The questions and metrics in its own collection.+- Tables, with their [segments](../data-modeling/semantic-layer/segments.md) and [measures](../data-modeling/semantic-layer/measures.md).+- The metrics in your [semantic layer](../data-modeling/semantic-layer/library.md), but no other metrics.+- The questions in the app's own collection, but no other questions.An app can write data only through the actions in its own collection.-Your agent saves the questions, metrics, and actions that the app needs to the app's collection, and the collection can hold only questions, metrics, and actions. When your agent saves an item to the collection, Metabase refuses the item if it breaks a rule. The main rules are:+Your agent writes the questions and actions that the app needs in the app's code, and generates the app's collection with those items. The collection can hold only questions and actions. Items follow these rules:-- Questions must be built with the query builder, not SQL. Questions can read only [published tables](../data-modeling/semantic-layer/published-tables.md) and metrics from your semantic layer, and the [segments](../data-modeling/semantic-layer/segments.md) and [measures](../data-modeling/semantic-layer/measures.md) of published tables. So questions can't start from or join another saved question or model.-- Actions can be table actions, which insert, update, or delete one row of a published table, or SQL actions.-- Items in the collection can't be archived or made public. Questions and metrics in the collection can't be embedded.+- Questions must be built with the query builder, not SQL, and must start from a table. So a question can't start from another saved question or model, even one in the app's collection. Questions also can't have explicit joins, custom columns, parameters, or more than one stage. But a question can use columns from linked tables through foreign keys, and the metrics in your semantic layer.+- Actions are table actions, which insert, update, or delete one row of a table by its primary key. Apps can't use SQL actions or model actions.+- Items in the collection can't be archived or made public. Questions in the collection can't be embedded.-Only admins can edit an app's collection. You can't move the app's collection, move it to the trash, or make it official.+Your agent follows these rules for you, but the rules limit what you can ask for. Some tips for guiding your agent:-## Build the app with your agent+- **Describe the result, not the SQL.** An app can't run SQL. So instead of pasting a query, ask for "revenue by month for each product category."+- **Name tables, not saved questions.** Instead of "Use our Weekly sales question," ask for "weekly sales from the Orders table." If the table isn't in your semantic layer, the agent stops and tells you what's missing.+- **Ask for columns from related tables.** "Show each order with its product's category" works if the Orders table has a foreign key to the Products table. Without a foreign key, the question can't get that column, because questions can't have explicit joins.+- **Ask for calculated values.** Like: "show each order's discount as a percentage", because the agent can calculate the value in the app's code.+- **Keep writes to one row.** "Let people edit a product" works. "Mark all of a customer's orders as refunded" doesn't, because an action changes only one row at a time.-1. [Install the Metabase CLI](../installation-and-operation/metabase-cli.md#install-the-cli), and [log the CLI in](../installation-and-operation/metabase-cli.md#authenticate-the-cli) as an admin to your development Metabase.-2. Install the [metabase-cli skill](../installation-and-operation/metabase-cli.md#the-metabase-cli-skill) for your agent. The CLI comes with its own skills for building data apps, and the metabase-cli skill tells your agent to load them.-3. On your development Metabase, [create a Remote Sync branch](../data-modeling/semantic-layer/remote-sync.md#creating-a-branch) for the app.-4. Start your agent in a local clone of your Remote Sync repository, so that the app's source code goes in the repository with the app. See [what syncs with a data app](#what-syncs-with-a-data-app).-5. Ask your agent to create a Metabase data app, and follow its instructions. For example:+The app's collection changes only when Metabase pulls it from your repository. You can't move the app's collection, move it to the trash, or make it official.- ```text- Create a Metabase data app that lets people look up product info, and add, edit, or remove products. Make it look cool.- ```+## Build an app on a development Metabase-The agent creates the app on your development Metabase, adds the questions and actions that the app needs to the app's collection, and writes the app's code in `data_apps/<slug>/`. Then the agent builds the app, and uploads the app's bundle (the built app, up to 10 MiB) to your development Metabase. The agent gives you the app's address, `/apps/<slug>`.+For every step, from installing your tools to opening the app, check out [Getting started with data apps](./getting-started.md). That guide builds on one Metabase. With a development Metabase, do these things differently:-To build and preview the app, the agent runs commands on your computer, like `mb` (the Metabase CLI), `npm run build`, and `npm run dev`. Your agent might ask for your permission before it runs these commands.+- **Log the CLI in to your development Metabase**, not your production Metabase.+- **Build each app on its own branch.** Ask your agent to create the branch on your development Metabase and in your clone, or [create a branch](../data-modeling/semantic-layer/remote-sync.md#creating-a-branch) on your development Metabase and switch your clone to it. If you build on the branch that your production Metabase pulls from (by default, your main branch), the app goes to production without review.-A new app starts live: it opens at its address. Admins can open the app right away. To let other people open it, [add their groups](./manage.md#choose-who-can-open-an-app) to the app. To take an app offline, [make it a draft](./manage.md#make-an-app-live-or-a-draft).+The agent stops if the directory isn't a clone of the repository that your development Metabase syncs with, or if the clone isn't on the branch that your development Metabase tracks. See [what syncs with a data app](#what-syncs-with-a-data-app).++The agent creates the app in `data_apps/<slug>/`, and writes the app's code there, with the questions and actions that the app needs. Then the agent generates the app's collection in `collections/data_apps/`, and builds the app's bundle (the built app, up to 10 MiB). When the app is ready, ask the agent to ship it. The agent [ships the app](#ship-the-app-to-production) to your branch, and pulls the branch into your development Metabase, where the app opens at `/apps/<slug>`.++To build, preview, and ship the app, the agent runs commands on your computer, like `mb`, `npm run build`, `npm run dev`, and `git`. Your agent might ask for your permission before it runs these commands.++The first time that a Metabase pulls an app, the app is [live](./manage.md#make-an-app-live-or-a-draft) on that Metabase: admins can open it at `/apps/<slug>`. To let other people open it, [add their groups](./manage.md#choose-who-can-open-an-app) to the app. To take an app offline, [make it a draft](./manage.md#make-an-app-live-or-a-draft).++## Preview the app on your computer> **The preview changes real data:** The preview runs the app's actions against the database that your development Metabase connects to. If that's your production data warehouse, the adds, edits, and deletes that you try out in the preview change your production data. Try out actions on rows that you add for testing.-The agent starts a preview of the app at a `localhost` address on your computer. The preview runs on your computer, but it gets its data from your development Metabase. Open the preview in your browser, and keep the tab open while the agent works: the agent reads the app's errors from the open preview. To start the preview again later, ask your agent.+The agent starts a preview of the app at a `localhost` address on your computer. The preview gets its data from your development Metabase, but it runs the app's questions and actions from the app's code, so your development Metabase doesn't need the app yet. Open the preview in your browser, and keep the tab open while the agent works: the agent reads the app's errors from the open preview. To start the preview again later, ask your agent.++In the preview, the app has a **Diagnostics** button, which shows the errors that the agent reads. The app in Metabase doesn't have this button.-The preview needs an admin [API key](../people-and-groups/api-keys.md). The agent creates the key on your development Metabase, writes it into a `.env.local` file that Git ignores, and deletes the key when it's done. Since the preview uses an admin key, it shows what an admin can see, not what the app's viewers can see.+The preview needs an admin [API key](../people-and-groups/api-keys.md). The agent asks before it creates the key on your development Metabase. Then the agent writes the key into a `.env.local` file that Git ignores, and deletes the key when it's done. If your session ends before the agent deletes the key, [delete the key](../people-and-groups/api-keys.md#deleting-api-keys) yourself. The key's name starts with `data-app`. Since the preview uses an admin key, it shows what an admin can see, not what the app's viewers can see.-If your agent can't create the key, for example because its permission settings block it, [create an API key](../people-and-groups/api-keys.md#create-an-api-key) in the **Administrators** group yourself. Then put it in a `.env.local` file in the app's directory, next to `package.json`:+If your agent can't create the key, for example because its permission settings block it, [create an API key](../people-and-groups/api-keys.md#create-an-api-key) in the **Administrators** group yourself. Then put it in a `.env.local` file at the root of your clone of the repository:```textDATA_APP_MB_URL=<your development Metabase URL>@@ -97,64 +102,78 @@ DATA_APP_MB_API_KEY=<your API key>Delete the key when you no longer need the preview.-## Ship the app to production with Remote Sync+## Ship the app to production-When [Remote Sync](../data-modeling/semantic-layer/remote-sync.md) is on, it always syncs your data apps, so an app ships to production like the rest of your synced content. Use the same steps for a new app and for each change to an app:+Your data apps always reach Metabase through your Git repository. When the app is ready, tell your agent:-1. On your development Metabase (in Read-write mode), [push your changes](../data-modeling/semantic-layer/remote-sync.md#pushing-changes-to-git) to your branch. The push adds the app's manifest, bundle, and collection to the branch.-2. In your local clone, switch to the branch, and pull it.-3. Commit the app's directory, `data_apps/<slug>/`, and push the commit. The commit adds the app's source code to the branch.-4. On your development Metabase, [pull the changes](../data-modeling/semantic-layer/remote-sync.md#pulling-changes-from-git). If you skip this step, the next push from Metabase has a conflict.-5. Merge your branch into the branch that your production Metabase pulls from, for example with a [pull request](../data-modeling/semantic-layer/remote-sync.md#step-4-create-a-pull-request).-6. On your production Metabase (in Read-only mode), [pull the changes](../data-modeling/semantic-layer/remote-sync.md#pulling-changes-from-git). If your production Metabase uses [auto-sync](../data-modeling/semantic-layer/remote-sync.md#pulling-changes-automatically), it pulls the changes on its own within five minutes.-7. The first time that you ship an app, [add the groups](./manage.md#choose-who-can-open-an-app) that can open the app on your production Metabase.+```text+Ship the app to my development Metabase.+```++The agent does steps 1 to 3 below for you. You then review the change, merge it, and pull it into production. Use the same steps for a new app and for each change to an app:-If you let your agent use Git, the agent can do these steps for you.+1. If your development Metabase has changes to synced content that the app reads, like a table that your agent just published, [push your changes](../data-modeling/semantic-layer/remote-sync.md#pushing-changes-to-git) to the app's branch. Then pull the branch in your local clone.+2. Commit the app's directory, `data_apps/<slug>/`, and its collection, `collections/data_apps/`, together, and push the branch.+3. On your development Metabase, [pull the changes](../data-modeling/semantic-layer/remote-sync.md#pulling-changes-from-git). Check the app at `/apps/<slug>`.+4. Merge your branch into the branch that your production Metabase pulls from, for example with a [pull request](../data-modeling/semantic-layer/remote-sync.md#step-4-create-a-pull-request).+5. On your production Metabase (in Read-only mode), [pull the changes](../data-modeling/semantic-layer/remote-sync.md#pulling-changes-from-git). If your production Metabase uses [auto-sync](../data-modeling/semantic-layer/remote-sync.md#pulling-changes-automatically), it pulls the changes on its own within five minutes.+6. The first time that you ship an app, [add the groups](./manage.md#choose-who-can-open-an-app) that can open the app on your production Metabase.-Remote Sync doesn't sync an app's group access or its [status](./manage.md#make-an-app-live-or-a-draft) (live or draft), so each Metabase keeps its own. The first pull creates the app on your production Metabase as live, and only admins can open it until you add groups there. Later pulls keep the app's status on production, so you can make the app a draft on production without changing it on development.+Metabase doesn't sync an app's group access or its [status](./manage.md#make-an-app-live-or-a-draft) (live or draft), so each Metabase keeps its own. The first pull creates the app on your production Metabase as live, and only admins can open it until you add groups there. Later pulls keep the app's status on production, so you can make the app a draft on production without changing it on development.-Your production Metabase also needs the published tables and metrics that the app reads. A pull doesn't check that the tables are published, but the pull fails if the app's questions use metrics that aren't in your production Library. So add your [Library](../data-modeling/semantic-layer/library.md), which holds your semantic layer, to Remote Sync too. If your app uses actions, [enable actions](../data-modeling/models/actions/introduction.md#enabling-actions-for-a-database) on the production databases that the app writes to.+Your production Metabase also needs the tables and metrics that the app reads. They ship with the app only if you [sync your semantic layer](../data-modeling/semantic-layer/library.md#versioning-the-library) with Remote Sync, so sync it too. If your app uses actions, you must [turn on data actions](../data-modeling/data-actions.md#turn-on-data-actions-for-a-database) on the production databases that the app writes to.### What syncs with a data app-Remote Sync syncs the app's manifest, its bundle, and its collection with its questions and actions. Remote Sync doesn't sync the app's source code: pushes from Metabase don't change the source code, and pulls ignore it. You commit the source code yourself. In your repository:+Metabase pulls the app's manifest, its bundle, and its collection with its questions and actions. Pulls ignore the app's source code. You (or your agent) commit all of these to your repository:-- `data_apps/<slug>/data_app.yaml` is the app's manifest.+- `data_apps/<slug>/data_app.yaml` is the app's manifest, with the app's slug, name, description, data apps version, bundle path, and [allowed hosts](#let-an-app-fetch-data-from-other-sites).- `data_apps/<slug>/dist/index.js` is the app's bundle.- The rest of `data_apps/<slug>/` is the app's source code.- `collections/data_apps/` holds the app's collection.-When your agent builds the app, it writes the bundle to `build/index.js` and uploads it to your development Metabase. When Metabase pushes the app, it writes the uploaded bundle to `dist/index.js`. So the template's `.gitignore` keeps `build/` out of your repository, together with `node_modules/` and `.env.local`. Don't edit the manifest or the bundle by hand.+When your agent builds the app, it writes the bundle to `dist/index.js`. Commit the bundle with the app's collection: the bundle runs the questions and actions in the collection, so a bundle without them fails. The `.gitignore` files in your repository keep `node_modules/` and `.env.local` out of it. In the manifest, you can edit the app's `name`, `description`, and `allowed_hosts`. Don't edit the rest of the manifest, the bundle, or the collection by hand.## Change a data app-1. On your development Metabase, [create a Remote Sync branch](../data-modeling/semantic-layer/remote-sync.md#creating-a-branch) for the change.-2. In your local clone of your Remote Sync repository, pull the latest source code, so that you start from the latest version of the app.-3. Start your agent in the clone, and ask for the change. The agent updates the code, builds the app again, and uploads the new version to your development Metabase.-4. [Ship the change to production](#ship-the-app-to-production-with-remote-sync).+Start your agent in your local clone of your Git repository, and tell it what to change. For example:++```text+Create a new branch from main on my development Metabase and in this clone. Then add a filter by product category to the orders-overview app, and ship the app to my development Metabase.+```++Then do the rest of the steps in [Ship the app to production](#ship-the-app-to-production).-Each app has only one bundle, and each upload replaces it, so Metabase has no version history for an app. If two people change the same app at the same time, the last upload wins: an upload from an older copy of the source code removes the changes in the newer bundle. To go back to an earlier version, ask your agent to build the app from an earlier commit of the source code, and upload it again.+To set up the branch yourself:-Any admin can change an app from their own computer. Clone your Remote Sync repository, do steps 1 and 2 of [Build the app with your agent](#build-the-app-with-your-agent), and start your agent in the clone. Git doesn't keep the app's packages (`node_modules/`) or the preview's API key (`.env.local`), so the agent installs the packages and creates a new API key on each computer.+1. On your development Metabase, [switch to the branch](../data-modeling/semantic-layer/remote-sync.md#switching-branches) that your production Metabase pulls from, and [pull the changes](../data-modeling/semantic-layer/remote-sync.md#pulling-changes-from-git). Then [create a branch](../data-modeling/semantic-layer/remote-sync.md#creating-a-branch) for the change.+2. In your local clone of your Git repository, pull the latest changes, and switch to the new branch.+3. Start your agent in the clone, and ask for the change. The agent updates the code, generates the app's collection, and builds the app again. When the change is ready, ask the agent to ship it.+4. [Ship the change to production](#ship-the-app-to-production).++Your repository keeps each version of the app, with the bundle and the source code that it was built from. To go back to an earlier version, revert the change in your repository, merge the revert, and pull the changes into your Metabases. If two people change the same app on different branches, the app's bundle and collection conflict when you merge the second branch. Merge the source code, and ask your agent to generate the collection and build the app again.++Any admin can change an app from their own computer. Git doesn't keep the app's packages (`node_modules/`) or the preview's API key (`.env.local`), so the agent installs the packages and creates a new API key on each computer.++### Fix an app after a Metabase upgrade++Most Metabase upgrades don't change your apps. But if an upgrade makes a breaking change to data apps, apps that were built for the older version of data apps stop opening. To fix an app, ask your agent to migrate the app to the current version of data apps, build it again, and ship it.## Let an app fetch data from other sites-A data app runs in a sandbox, so by default the app can't make network requests to other sites. To let an app get data from a site, add the site's origin to the app's allowed hosts:+A data app runs in a sandbox, so by default the app can't make network requests to other sites. To let an app get data from a site, add the site's origin to `allowed_hosts` in the app's manifest, `data_apps/<slug>/data_app.yaml`:-```sh-mb data-app update <slug> --body '{"allowed_hosts":["https://api.example.com"]}'+```yaml+allowed_hosts:+ - https://api.example.com```-The list replaces the app's allowed hosts, so include every origin that the app needs. Your agent can also change the list for you.+Then [ship the change](#ship-the-app-to-production). Your agent can also change the list for you.The app can then get data from the site with `fetch`. The app can also show the site's images, embed the site's pages, and submit forms to the site. An origin that starts with `*.`, like `https://*.example.com`, matches subdomains, but not the domain itself.## Have fun-Ask your agent for any style you like.+Ask your agent for any style you like. You can even travel through time:--## Let us know what you think--Data apps are in active development. If you run into a bug or have an idea for how data apps should work, [file an issue](https://github.com/metabase/metabase/issues/new/choose).diff --git a/docs/data-apps/getting-started.md b/docs/data-apps/getting-started.mdnew file mode 100644index 00000000000..5705d513c7e--- /dev/null+++ b/docs/data-apps/getting-started.md@@ -0,0 +1,233 @@+---+title: Getting started with data apps+summary: A step-by-step guide to using an AI coding agent to build a data app with Metabase.+---++# Getting started with data apps++++> **Beta:** Data apps are in beta.++{% include plans-blockquote.html feature="Data apps" is_plural=true %}++This page is a step-by-step guide to using an AI coding agent to build a [data app](./build.md) with Metabase.++The basic workflow:++- You build an app locally with an agent.+- You can preview the app on your machine.+- When you're happy with it, your agent saves the app to a Git repository, and your Metabase gets the app from that repository. A Git repository stores your app's code, and keeps each version of it.++The app we build in this guide only shows data, so it works with any database that Metabase connects to. If your data warehouse is PostgreSQL or MySQL, you can also add a [form that changes data](#add-a-form-that-changes-data).++## What you need++- An admin account on a Metabase on a Pro or Enterprise plan.+- An AI coding agent, like Claude Code or Codex.+- Git on your computer, and an account on GitHub, GitLab, or Bitbucket. Your Metabase gets your app from a Git repository. If you don't have a repository, [step 5](#5-connect-your-metabase-to-a-git-repository) shows you how to connect one.++## Set up your tools++You do these steps once.++### 1. Install Node.js++Install [Node.js](https://nodejs.org/) 22.12 or later. To check which version you have, run:++```sh+node --version+```++### 2. Install the Metabase CLI, and log in to your production Metabase++Your agent uses the [Metabase CLI](../installation-and-operation/metabase-cli.md) (`mb`) to work with your production Metabase. Install the CLI:++```sh+npm install -g @metabase/cli+```++If you already have the CLI, run `mb upgrade` to get the latest version.++Then log the CLI in to your production Metabase. Use your Metabase's URL:++```sh+mb auth login --url https://metabase.example.com+```++The CLI offers to open Metabase in your browser. Sign in with your admin account, and approve the CLI.++### 3. Add the metabase-cli skill to your agent++The [metabase-cli skill](../installation-and-operation/metabase-cli.md#the-metabase-cli-skill) is the only skill you need to add to your agent. It tells your agent to use the CLI and to load the skills that come with the CLI, including the skills for building data apps. Those bundled skills update when you upgrade the CLI. To add the skill to Claude Code, run:++```sh+npx skills add metabase/agent-skills --skill metabase-cli -a claude-code+```++For other ways to install the skill, check out [The metabase-cli skill](../installation-and-operation/metabase-cli.md#the-metabase-cli-skill).++If you can't add the skill to your agent, tell your agent to run `mb skills get data-app` before it starts on the app.++### 4. Publish tables to your semantic layer++Your agent builds your app on the tables that are [published](../data-modeling/semantic-layer/published-tables.md) to your semantic layer. The [semantic layer](../data-modeling/semantic-layer/library.md) is your set of curated tables and metrics: the data that you've checked, and that people and AI should use. Building on it means your app shows the same vetted numbers as the rest of your Metabase. So publish trusted tables that are ready for analysis.++If you haven't created your semantic layer yet, ask your agent to create it for you and add the tables it needs.++You can also create your semantic layer and add tables manually:++1. Click the **grid** icon in the upper right, and select **Data studio**.+2. In the left sidebar, click **Semantic layer**. If Metabase asks you to create your semantic layer, click **Create my semantic layer**.+3. Look in the **Data** section. If the tables that your app needs are there, go to [step 5](#5-connect-your-metabase-to-a-git-repository).+4. Otherwise, [publish the tables](../data-modeling/semantic-layer/published-tables.md#publish-a-table-from-the-semantic-layer) that your app needs.++If your Metabase already syncs in Read-only mode, and the tables that your app needs aren't published, build your apps on a development Metabase in Read-write mode instead. See [Choose where to build apps](./build.md#choose-where-to-build-apps).++### 5. Connect your Metabase to a Git repository++Skip this step if your Metabase already syncs with a Git repository.++Your Metabase connects to a repository with a feature called [Remote Sync](../data-modeling/semantic-layer/remote-sync.md), which has two modes:++- **Read-only**: Metabase only reads from the repository. You and your agent can't change the semantic layer in Metabase. Changes come only from the repository. Use this mode for a production Metabase that people rely on.+- **Read-write**: Metabase can also write to the repository, and you and your agent can change the semantic layer in Metabase. Use this mode if you're only trying out data apps.++Choose a mode now, because each mode needs a different access token.++1. Create a new repository on GitHub, GitLab, or Bitbucket, and initialize it with a README file. See [Set up a repository](../data-modeling/semantic-layer/remote-sync.md#1-set-up-a-repository-to-store-your-content).+2. Create an access token for the repository. For Read-only mode, see [Create a token for your production Metabase](../data-modeling/semantic-layer/remote-sync.md#5-create-a-token-for-your-production-metabase). For Read-write mode, see [Create a token for your development Metabase](../data-modeling/semantic-layer/remote-sync.md#2-create-a-token-for-your-development-metabase).+3. On your Metabase, go to **Admin** > **Settings** > **Remote sync**.+4. In **Repository URL**, enter the repository's URL, for example `https://github.com/your-org/your-repo`.+5. Select the mode that you chose.+6. In **Access Token**, paste the token.+7. Click **Set up remote sync**.++Metabase pulls from the repository's default branch, usually `main`.++**Anyone who can push to the repository can change the content in your Metabase, so give write access only to people that you trust as admins.**++The rest of this guide assumes that your Metabase is in Read-only mode.++### 6. Clone the repository++Clone the repository that you connected in [step 5](#5-connect-your-metabase-to-a-git-repository) to your computer, and change into its directory. Use your repository's URL:++```sh+git clone https://github.com/your-org/your-repo+cd your-repo+```++Your agent works in this folder, on the branch that your production Metabase pulls from. To find that branch, go to **Admin** > **Settings** > **Remote sync** on your production Metabase, and look at **Sync branch**. It's probably `main` or `master`.++## Build the app++### 7. Ask your agent for the app++Start your agent in the folder of your clone, and describe the app. For example:++```text+Create a Metabase data app that shows our orders by month, and a table of the latest orders. Make it look cool.+```++The agent:++- Writes the app's code in `data_apps/<slug>/`, where `<slug>` is the app's short name. The code includes the questions that the app runs.+- Starts a preview of the app.++Ask for an app that uses the tables and metrics that are already in your semantic layer. If the app needs a table or a metric that isn't in your semantic layer, the agent stops and tells you what's missing.++The agent runs commands on your computer, like `mb`, `npm`, and `git`, and it might ask for your permission first.++### 8. Preview the app++The agent starts the [data app preview](./build.md#preview-the-app-on-your-computer) at a `localhost` address on your computer. This preview is just the app running on your local machine; it's not yet on your Metabase. The preview allows the agent to "see" the app in the browser and iterate on the app's design.++Open the preview in your browser, and keep the tab open while the agent works: the agent reads the app's errors from the open preview.++The preview gets its data from your Metabase with an admin [API key](../people-and-groups/api-keys.md). So the preview shows what an admin can see, not necessarily what the app's viewers can see. You choose who can open the app in [step 10](#10-add-groups-to-the-app).++The agent asks before it creates the key, and deletes the key when it's done. If your session ends first, [delete the key](../people-and-groups/api-keys.md#deleting-api-keys) yourself. The key's name starts with `data-app`.++Ask your agent for changes until the app looks the way you want.++### 9. Ship the app++When the app is ready, tell your agent:++```text+Ship the app to my Metabase.+```++The agent:++- Builds the app.+- Commits the app to the branch that your production Metabase pulls from.+- Pushes the branch to your repository.+- Pulls the branch into your production Metabase with the CLI.++If your agent can't commit or push (for example, because your agent's permission settings block `git commit` or `git push`), run the commands yourself in your local clone. Use your app's slug. The agent adds `.env.local` to your `.gitignore` file to keep the preview's API key out of Git, so commit `.gitignore` too:++```sh+git add .gitignore data_apps/<slug> collections/data_apps+git commit -m "Add the <slug> data app"+git push+```++Then, on your production Metabase, [pull the changes](../data-modeling/semantic-layer/remote-sync.md#pulling-changes-from-git).++Open the app at `/apps/<slug>` on your production Metabase, for example `https://metabase.example.com/apps/orders-overview`.++## Grant permissions to groups++For others to view the app, you'll need to grant them permissions.++### 10. Add groups to the app++1. In your Metabase, click the **grid** icon in the upper right, and select **Data studio**.+2. Click **Data apps**, and click the app.+3. On the **Permissions** tab, add the groups that can open the app.++People in those groups can now open the app at `/apps/<slug>`. The app runs with each person's [data permissions](../permissions/data.md), so people see only the data that they're allowed to see. For more, see [Choose who can open an app](./manage.md#choose-who-can-open-an-app).++## Edit the app++1. In your clone of the repository, pull the latest changes:++ ```sh+ git pull+ ```++2. Start your agent in the directory and ask it for the changes you want.+3. Check the change in the preview.+4. When the change is ready, ask your agent:++ ```text+ Ship the app to my Metabase.+ ```++5. Check the app on your production Metabase.++## Add a form that changes data++An app can also add, edit, and delete rows in your database, with actions. Actions only work on tables in [PostgreSQL and MySQL](../data-modeling/data-actions.md#databases-that-support-data-actions) databases.++> **The preview changes production data:** The preview runs the app's actions against the database that your production Metabase connects to. Try out the form on rows that you add for testing.++1. On your production Metabase, [turn on data actions](../data-modeling/data-actions.md#turn-on-data-actions-for-a-database) for the database.+2. Do the steps in [Edit the app](#edit-the-app), and ask your agent for the form. For example:++ ```text+ Add a form to the app that lets people add a product.+ ```++For the rules that an app's actions follow, see [What a data app can read and write](./build.md#what-a-data-app-can-read-and-write).++## Let us know what you think++Data apps are in active development. If you run into a bug or have an idea for how data apps should work, [file an issue](https://github.com/metabase/metabase/issues/new/choose).++## Next steps++- [Data apps](./build.md): The full reference for building, previewing, shipping, and changing apps.+- [Manage data apps](./manage.md): Make apps live or drafts, and check which data each app reads and writes.diff --git a/docs/data-apps/images/data-app-permissions.png b/docs/data-apps/images/data-app-permissions.pngnew file mode 100644index 00000000000..6f2740df107Binary files /dev/null and b/docs/data-apps/images/data-app-permissions.png differdiff --git a/docs/data-apps/images/example-data-app.png b/docs/data-apps/images/example-data-app.pngindex 7aea22967be..d20810f8571 100644Binary files a/docs/data-apps/images/example-data-app.png and b/docs/data-apps/images/example-data-app.png differdiff --git a/docs/data-apps/images/store-explorer-sample-data-app.png b/docs/data-apps/images/store-explorer-sample-data-app.pngnew file mode 100644index 00000000000..9eec0ff2714Binary files /dev/null and b/docs/data-apps/images/store-explorer-sample-data-app.png differdiff --git a/docs/data-apps/manage.md b/docs/data-apps/manage.mdindex ca38e45423e..0feb165f6f4 100644--- a/docs/data-apps/manage.md+++ b/docs/data-apps/manage.md@@ -7,6 +7,8 @@ summary: In Data Studio, admins see what each data app reads and writes, make ap_Data Studio > Data apps_+> **Beta:** Data apps are in beta.+{% include plans-blockquote.html feature="Data apps" is_plural=true %}Only admins can manage data apps.@@ -14,7 +16,7 @@ Only admins can manage data apps.1. Click the **grid** icon in the upper right and select **Data studio**.2. In the left sidebar, under **Library**, click **Data apps**.-The list shows each app's **Name**, **Address**, **Status**, and **Last synced** time. The address is where people open the app, `/apps/<slug>`. **Last synced** is the last time the app itself changed, like a new bundle or a status change. Edits to the app's questions and actions don't update it.+The list shows each app's **Name**, **Address**, **Status**, and **Last synced** time. The address, `/apps/<slug>`, is where people open the app. The slug is the app's short name. **Last synced** is the last time the app itself changed, like a new bundle or a status change. Edits to the app's questions and actions don't update it.@@ -22,12 +24,12 @@ To open a live app, click the **three dots** on the app's row and select **Open## See what an app reads and writes-Before you let more people open an app, check which data the app reads and writes. In the list of data apps, click the app. The app's **Questions** and **Actions** tabs list the questions and actions in the app's collection, and the **Permissions** tab lists the groups that can open the app. The list of questions doesn't include the app's metrics. The app's **Overview** tab has a preview of the app.--These tabs don't show everything that the app can read. The app can also read your published tables, and the metrics and dashboards in your Library. See [what a data app can read and write](./build.md#what-a-data-app-can-read-and-write).+Before you let more people open an app, check which data the app reads and writes. In the list of data apps, click the app. The app's **Overview** tab has a preview of the app. The **Questions** and **Actions** tabs list the questions and actions in the app's collection, and the **Permissions** tab lists the groups that can open the app.+These tabs don't show everything that the app can read. The app can also query any table that the person who opens it can access, and the metrics in your semantic layer. See [what a data app can read and write](./build.md#what-a-data-app-can-read-and-write).+To see what a question or action depends on, open the question or action, and go to its **Dependencies** tab. To see the whole app, look up the app in the [dependency graph](../data-modeling/tools/graph.md).To see the questions and actions that your apps run, who runs them, and what fails, check out [Data app analytics](../monitor/data-app-analytics.md) in Monitor.@@ -54,15 +56,15 @@ On the app's **Permissions** tab:Admins can always open live apps, so you can't add the **Administrators** group. If an app has no groups, only admins can open it.-[Tenant users](../embedding/tenants.md#user-types) can't open data apps. You can't add [tenant groups](../embedding/tenants.md#create-tenant-groups) or the **All tenant users** group to an app, and tenant users can't be in the other groups.+[Tenant users](../embedding/tenants.md#user-types) can't open data apps, so you can add only [internal groups](../embedding/tenants.md#group-types) to an app. You can't add [tenant groups](../embedding/tenants.md#create-tenant-groups) or the **All tenant users** group.### Check that groups can see the app's data-Adding a group to an app lets people in that group open the app, and gives the group read access to the app's collection. Adding a group doesn't change their [data permissions](../permissions/data.md). If the **Data access** column says **Missing N tables**, people in that group don't have [Can view](../permissions/data.md#can-view-data-permission) access to some of the tables that the app's questions and actions read. The check counts the group's own access, and All Users access, but not access that people get from their other groups. The check also doesn't look at [row and column security](../permissions/row-and-column-security.md): a group with row and column security can show **All tables**, but people in that group can't run the app's actions on that database.+Adding a group to an app lets people in that group open the app, and gives the group read access to the app's collection. Adding a group doesn't change their [data permissions](../permissions/data.md).-+If the **Data access** column says **Missing N tables**, people in that group don't have [Can view](../permissions/data.md#can-view-data-permission) access to some of the tables that the app's questions and actions read. The check counts the group's own access, and All Users access, but not access that people get from their other groups. The check also doesn't look at [row and column security](../permissions/row-and-column-security.md): a group with row and column security can show **All tables**, but people in that group can't run the app's actions on that database. And since the check uses the [dependency graph](../data-modeling/tools/graph.md), which updates in the background, a warning can lag behind your latest edits.-The check uses the [dependency graph](../data-modeling/tools/graph.md). Since the graph updates in the background, a warning can also lag behind your latest edits.+To fix the group's access:@@ -71,10 +73,12 @@ To fix the group's access:## Delete a data app-Data Studio doesn't have an option to delete apps. To delete an app, ask your agent, or run:+Data Studio doesn't have an option to delete apps. To delete an app, ask your agent, or delete these from your Git repository on a branch:++- `data_apps/<slug>/`+- `collections/data_apps/data_app__<slug>.yaml`+- `collections/data_apps/data_app__<slug>/`-```sh-mb data-app delete <slug>-```+Then merge the branch into the branch that your production Metabase pulls from, and [pull the changes](../data-modeling/semantic-layer/remote-sync.md#pulling-changes-from-git) into each Metabase that has the app.-Deleting an app also deletes its collection (with its questions and actions), its bundle, and its group access.+Deleting an app also deletes its collection (with its questions and actions), its bundle, and its group access. To take an app offline without deleting it, [make it a draft](#make-an-app-live-or-a-draft).diff --git a/docs/data-apps/start.md b/docs/data-apps/start.mdindex d80a92be3ad..c107c59235c 100644--- a/docs/data-apps/start.md+++ b/docs/data-apps/start.md@@ -4,11 +4,19 @@ title: Data apps overview# Data apps overview+> **Beta:** Data apps are in beta.++{% include plans-blockquote.html feature="Data apps" is_plural=true %}+Data apps are custom apps that you build on your Metabase data with an AI coding agent. Like dashboards, data apps show your data from your semantic layer. But an app can have any layout and its own pages, and people can add, edit, and delete data from the app. A data app runs with the permissions of the person who opens it, so people see only the data that they're allowed to see.+## [Getting started with data apps](./getting-started.md)++Build your first app, step by step. You need only your production Metabase.+## [Build a data app](./build.md)-What you need to build an app, how an AI coding agent builds and changes it with the Metabase CLI, where to keep the app's source code, and how to ship the app to production with Remote Sync.+What you need to build an app, how an AI coding agent builds and changes it with the Metabase CLI, where to keep the app's source code, and how to ship the app to production with Git.## [Manage data apps](./manage.md)diff --git a/docs/data-modeling/data-actions.md b/docs/data-modeling/data-actions.mdindex 62b0ff56e4f..3bfb0014a43 100644--- a/docs/data-modeling/data-actions.md+++ b/docs/data-modeling/data-actions.md@@ -1,13 +1,18 @@---title: Data actionssummary: Data actions insert, update, or delete rows in your database. You can run them in Data Studio or share them as public forms.+redirect_from:+ - /docs/latest/actions+ - /docs/latest/actions/start---# Data actions++_Data Studio > Data actions_-Data actions let people change the data in your database. For example, a data action can approve a request, or mark an order as refunded.+Data actions let people change the data in your database. For example, a data action can add a product, update a customer's address, or mark an order as refunded.Each data action does one job: it inserts, updates, or deletes rows. An admin sets up the action once, and people can only make the changes that the action allows.@@ -16,13 +21,38 @@ You can run data actions in two ways:- **In Data Studio**, to test an action or make a one-off change. See [Run a data action](#run-a-data-action).- **As a public form**, to collect data from people outside Metabase, like event sign-ups or feedback. See [Share a data action as a public form](#share-a-data-action-as-a-public-form).-Unlike [model actions](./models/actions/introduction.md), data actions don't belong to a [model](./models/models.md). You don't need to create a model first, and data actions stay put when someone moves a model to the trash. But you can't add data actions to [dashboard buttons](../dashboards/actions.md). For a dashboard button, use a model action.+Unlike [model actions](./models/actions/introduction.md), data actions don't belong to a [model](./models/models.md), and you can't add data actions as buttons to dashboards. For a [dashboard button](../dashboards/actions.md), use a model action.If you [sync the Library](./semantic-layer/library.md#versioning-the-library) with [Remote Sync](semantic-layer/remote-sync.md), your data actions sync with it.+## Databases that support data actions++Data actions are available for the following databases:++- [PostgreSQL](../databases/connections/postgresql.md)+- [MySQL](../databases/connections/mysql.md)++The same databases support [model actions](./models/actions/introduction.md) and actions in [data apps](../data-apps/build.md#what-a-data-app-can-read-and-write).++You can't turn on data actions for a database that uses [database routing](../permissions/database-routing.md).++## Turn on data actions for a database++_Admin > Databases > Data actions_++Before you can create or run actions on a database, an admin has to turn on data actions for that database. The setting covers every kind of action on the database: data actions, actions in [data apps](../data-apps/build.md#what-a-data-app-can-read-and-write), and [model actions](./models/actions/introduction.md).++You can turn on data actions only for [databases that support them](#databases-that-support-data-actions).++1. Click the **grid** icon in the upper right, and go to **Admin** > **Databases**.+2. Click the database.+3. In the **Data actions** section, turn on **Data actions**.++Actions write to your database, so the database user you use to connect to the database needs [write privileges](../databases/users-roles-privileges.md#privileges-to-enable-actions-and-editable-table-data). If the database has a [writable connection](../databases/writable-connection.md), actions use it.+## Create a data action-Only admins can create data actions. Data actions only work on PostgreSQL and MySQL databases. The **New** button only shows up if an admin has [turned on data actions](./models/actions/introduction.md#enabling-actions-for-a-database) for at least one of these databases.+Only admins can create data actions. The **New** button only shows up if an admin has [turned on data actions](#turn-on-data-actions-for-a-database) for at least one database.You can create a data action in two ways:@@ -33,7 +63,7 @@ You can create a data action in two ways:1. Go to [Data Studio](./data-studio.md#get-to-data-studio) > **Data actions**.2. Click **New** > **SQL query**.-3. Write your SQL. Each {% raw %}{{ variable }}{% endraw %} in the SQL becomes a field on the action's form. For examples, see [Example custom actions](./models/actions/custom.md#example-custom-actions).+3. Write your SQL. Each `{% raw %}{{ variable }}{% endraw %}` in the SQL becomes a field on the action's form. For examples, see [Example custom actions](./models/actions/custom.md#example-custom-actions).4. Click **Save**, enter a **Name**, pick a **Folder**, and click **Save** again.### Create a data action that changes one row@@ -43,9 +73,7 @@ Pick a table and an operation, and Metabase builds the form from the table's col1. Go to [Data Studio](./data-studio.md#get-to-data-studio) > **Data actions**.2. Click **New** > **Table**, and pick a table. The picker only lists tables in databases with data actions turned on.3. Under **Operation**, pick **Insert** to add a row, **Update** to change a row, or **Delete** to remove a row. Update and Delete find the row by its primary key, and Update keeps the current value of any field you leave empty.-4. Click **Save**, enter a **Name** (Metabase suggests one, like "Insert Orders"), pick a **Folder**, and click **Save** again.--+4. Click **Save**, enter a **Name**, pick a **Folder**, and click **Save** again.## Run a data action@@ -53,7 +81,7 @@ Pick a table and an operation, and Metabase builds the form from the table's col2. Go to the **Run** tab and click the **Run** button.3. Fill out the form and submit it. Metabase makes the change in your database.-If the **Run** button is grayed out, data actions are turned off for the action's database, or you don't have access to that database.+If the **Run** button is grayed out, [data actions are turned off](#turn-on-data-actions-for-a-database) for the action's database, or you don't have access to that database.@@ -62,7 +90,9 @@ If the **Run** button is grayed out, data actions are turned off for the action'Go to **Data Studio** > **Data actions** and click the action.- **To change what the action does**, go to the **Definition** tab. For a SQL action, click **Edit definition**. For a table action, click **Change table** or pick another **Operation**.-- **To change the action's form**, go to the **Fields** tab and click a field to change its type, input, default value, and more. A SQL action has one field for each {% raw %}{{ variable }}{% endraw %} in the SQL. A table action has one field for each column that it writes (for Delete, only the primary key), and you can only show or hide these fields. If you turn off **Show field**, the action uses the field's default value.+- **To change the action's form**, go to the **Fields** tab and click a field to change its type, input, default value, and more. A SQL action has one field for each `{% raw %}{{ variable }}{% endraw %}` in the SQL. A table action has one field for each column that it writes (for Delete, only the primary key), and you can only show or hide these fields. If you turn off **Show field**, the action uses the field's default value.++## Share a data action as a public form@@ -90,6 +120,8 @@ Anyone who can view a folder can run the actions in it. So use folders to give e- **Change who can run a folder's actions**: Click the **three-dot** menu next to the folder, and select **Change permissions**. For actions that aren't in a folder, click the **three-dot** menu next to the **New** button, and select **Change permissions**.- **Move an action to another folder**: Open the action, click the **three-dot** menu next to its name, and select **Move**.++## Archive and unarchive data actions- **Archive an action**: Open the action, click the **three-dot** menu next to its name, and select **Archive**. Public forms that use an archived action stop working until you unarchive the action.@@ -104,7 +136,8 @@ Only admins can create, edit, move, archive, or unarchive data actions and their## Further reading-- [Introduction to actions](./models/actions/introduction.md)+- [Data Studio](./data-studio.md)+- [Data apps](../data-apps/start.md)+- [Introduction to model actions](./models/actions/introduction.md)- [Basic actions](./models/actions/basic.md)- [Custom actions](./models/actions/custom.md)-- [Data Studio](./data-studio.md)diff --git a/docs/data-modeling/editable-tables.md b/docs/data-modeling/editable-tables.mdindex 8ec7811b96f..bb17e85e1a2 100644--- a/docs/data-modeling/editable-tables.md+++ b/docs/data-modeling/editable-tables.md@@ -73,7 +73,7 @@ If you try to delete a row that has foreign key references from other tables, yo## Editable table data vs. actions-Metabase offers two ways to modify data in your database: **editable table data** and [actions](../data-modeling/models/actions/introduction.md).+Metabase offers two ways to modify data in your database: **editable table data** and [actions](./data-actions.md).### When to use editable tables@@ -94,4 +94,4 @@ Use actions to:- Give non-admins the ability to modify data.- Add a button to a dashboard to trigger a form or query.-See [actions](../data-modeling/models/actions/introduction.md).+See [data actions](./data-actions.md), or [model actions](./models/actions/introduction.md) for dashboard buttons.diff --git a/docs/data-modeling/images/data-action-fields.png b/docs/data-modeling/images/data-action-fields.pngnew file mode 100644index 00000000000..66327c932e7Binary files /dev/null and b/docs/data-modeling/images/data-action-fields.png differdiff --git a/docs/data-modeling/images/data-action-folder-permissions.png b/docs/data-modeling/images/data-action-folder-permissions.pngnew file mode 100644index 00000000000..9601f2d3397Binary files /dev/null and b/docs/data-modeling/images/data-action-folder-permissions.png differdiff --git a/docs/data-modeling/models/actions/basic.md b/docs/data-modeling/models/actions/basic.mdindex b3eb05cafc4..9c9a141dee0 100644--- a/docs/data-modeling/models/actions/basic.md+++ b/docs/data-modeling/models/actions/basic.md@@ -10,9 +10,11 @@ Basic actions are "implicit" [actions](./introduction.md) that do things that peIf you only want to give people the option to update a subset of columns, or update columns in multiple tables, you can write a [custom action](./custom.md).+To add, update, or delete one row without a model, create a [data action from a table](../../data-actions.md#create-a-data-action-that-changes-one-row).+## Creating basic actions-Only admins can create basic actions. Once actions are enabled, you can create basic actions on a new or existing [model](../../../data-modeling/models/models.md) that only wraps a single database table.+Only admins can create basic actions. Once an admin [turns on data actions](../../data-actions.md#turn-on-data-actions-for-a-database) for the database, you can create basic actions on a new or existing [model](../../../data-modeling/models/models.md) that only wraps a single database table.1. Visit the model and click the **info** button.2. Click **Actions**.@@ -76,6 +78,6 @@ If you have basic actions enabled for a model, you can click on an individual re## Further reading-- [Introduction to actions](./introduction.md)+- [Introduction to model actions](./introduction.md)- [Custom actions](./custom.md)- [Actions in dashboards](../../../dashboards/actions.md)diff --git a/docs/data-modeling/models/actions/custom.md b/docs/data-modeling/models/actions/custom.mdindex a829a969a14..4cc5496a559 100644--- a/docs/data-modeling/models/actions/custom.md+++ b/docs/data-modeling/models/actions/custom.md@@ -168,6 +168,6 @@ FROM prospects;## Further reading-- [Introduction to actions](./introduction.md)+- [Introduction to model actions](./introduction.md)- [Basic actions](./basic.md)- [Actions in dashboards](../../../dashboards/actions.md)diff --git a/docs/data-modeling/models/actions/introduction.md b/docs/data-modeling/models/actions/introduction.mdindex 13d72c81d1d..fade415da31 100644--- a/docs/data-modeling/models/actions/introduction.md+++ b/docs/data-modeling/models/actions/introduction.md@@ -1,58 +1,56 @@----title: Introduction to actions+title: Introduction to model actionsredirect_from:- /docs/latest/actions/introduction----# Introduction to actions+# Introduction to model actions-> For now, actions are only available for PostgreSQL and MySQL.+> Like [data actions](../../data-actions.md), model actions only work on [PostgreSQL and MySQL](../../data-actions.md#databases-that-support-data-actions).-## What are actions?+## What are model actions?-**Actions** are entities in Metabase that let you build custom forms and business logic.+**Actions** are entities in Metabase that let you build custom forms and business logic. **Model actions** are actions that belong to a [model](../models.md).-Actions let you write parameterized SQL that writes back to your database. Actions can be attached to [buttons on dashboards](../../../dashboards/actions.md) to create custom workflows. You can even publicly share the parameterized forms that actions generate to collect data.+Model actions let you write back to your database. You can attach model actions to [buttons on dashboards](../../../dashboards/actions.md) to create custom workflows. You can even publicly share the forms that actions generate to collect data.-Here are a few ideas for what you can do with actions:+Here are a few ideas for what you can do with model actions:- Mark the customer you’re viewing in a dashboard as a VIP.- Let team members remove redundant data.- Create a customer feedback form and embed it on your website.-Actions can belong to a [model](../../../data-modeling/models/models.md), or stand on their own as [data actions](../../data-actions.md). Either way, actions only run on the raw tables in your database (so actions will never edit your [model definition](../../../data-modeling/models/models.md#edit-a-models-query)).+Model actions only run on the raw tables in your database, so they never edit your [model definition](../../../data-modeling/models/models.md#edit-a-models-query).If you're an admin who just wants to edit data in your tables, check out [Editable table data](../../../data-modeling/editable-tables.md).-## Enabling actions for a database+## Enabling model actions for a database-For actions to work, you'll first need to do the following two things:+To use model actions on a database, an admin has to turn on data actions for it. The setting covers model actions too. See [Turn on data actions for a database](../../data-actions.md#turn-on-data-actions-for-a-database).-1. **Enable data actions for the database connection**. To enable actions for a database connection, admins should click on the **grid** icon in the upper right and navigate to **Admin** > **Databases**, then click on the database you want to create actions for. In the **Data actions** section, turn on the **Data actions** toggle. For actions to work, the database user account (the account you're using to connect to the database) must have [write permissions](../../../databases/users-roles-privileges.md#privileges-to-enable-actions-and-editable-table-data). And for now, actions are only supported on PostgreSQL and MySQL databases. This toggle covers both model actions and [data actions](../../data-actions.md).-2. **For actions on models, create at least one model from that database.** Model actions are associated with models, so you'll need to have created (or have access to) at least one model before you can start creating them. [Data actions](../../data-actions.md) don't need a model.+Model actions also need a model. Create at least one model on the database before you create model actions.-## Who can use actions+## Who can use model actions-- **To create, edit, or delete an action**, you must be an admin. But people with Curate access to a model's collection can delete the model's actions by [moving the model to the trash](#deleting-a-model-deletes-its-actions).-- **To run an action**, all you need is view access to the action's model or [data actions](../../data-actions.md) folder (or a link to a public action). To run an action from a [dashboard button](../../../dashboards/actions.md), you also need view access to the dashboard. But people with [row and column security](../../../permissions/row-and-column-security.md#people-with-row-and-column-security-cant-run-actions) on any table in a database can't run actions on that database.+- **To create, edit, or delete a model action**, you must be an admin. But people with Curate access to a model's collection can delete the model's actions by [moving the model to the trash](#deleting-a-model-deletes-its-actions).+- **To run a model action**, all you need is view access to the action's model (or a link to a public action). To run an action from a [dashboard button](../../../dashboards/actions.md), you also need view access to the dashboard. But people with [row and column security](../../../permissions/row-and-column-security.md#people-with-row-and-column-security-cant-run-actions) on any table in a database can't run actions on that database.-## Types of actions+## Types of model actions-There are two types of actions:+There are two types of model actions:- [Basic](./basic.md)- [Custom](./custom.md)-## Running actions+## Running model actions-There are multiple ways to run actions:+There are multiple ways to run model actions:- [From the model details page](../../../data-modeling/models/models.md#model-details) by clicking the **run** button.- From a [public form](./custom.md#make-public) of an action.- From a [button on dashboard](../../../dashboards/actions.md).-- From the **Run** tab of a [data action](../../data-actions.md#run-a-data-action).## Deleting a model deletes its actions@@ -91,6 +89,7 @@ Before using actions in production, consider playing around with actions on some## Further reading+- [Data actions](../../data-actions.md)- [Basic actions](./basic.md)- [Custom actions](./custom.md)- [Actions in dashboards](../../../dashboards/actions.md)diff --git a/docs/data-modeling/models/actions/start.md b/docs/data-modeling/models/actions/start.mdindex 0686c376f47..0dfd49f5b02 100644--- a/docs/data-modeling/models/actions/start.md+++ b/docs/data-modeling/models/actions/start.md@@ -1,20 +1,18 @@----title: Actions overview+title: Model actionsredirect_from:- /docs/latest/data-modeling/models/actions/start- - /docs/latest/actions- - /docs/latest/actions/start----# Actions overview+# Model actions-Actions let you write parameterized SQL that can then be attached to buttons, clicks, or even added on the page as form elements.+Model actions are actions that belong to a [model](../models.md).-## [Introduction to actions ](./introduction.md)+## [Introduction to model actions](./introduction.md)-Use actions to update your data based on user input or values on the page.+Use model actions to update your data based on user input or values on the page.## [Basic actions](./basic.md)@@ -24,10 +22,6 @@ Metabase will create basic actions that auto-track a model's schema.Write SQL to create new actions.-## [Data actions](../../data-actions.md)--Create actions that you can run in Data Studio, or share as public forms.-## [Actions on dashboards](../../../dashboards/actions.md)Add actions on dashboards as buttons that you can pass filter values to.diff --git a/docs/data-modeling/semantic-layer/remote-sync.md b/docs/data-modeling/semantic-layer/remote-sync.mdindex 2f89a57ac68..6fd48b241de 100644--- a/docs/data-modeling/semantic-layer/remote-sync.md+++ b/docs/data-modeling/semantic-layer/remote-sync.md@@ -43,7 +43,7 @@ Your repository can't change users, groups, or permissions, because those [don't### Remote sync has two modes for different roles- **Read-write mode for your development Metabase**: Create and edit Library content and transforms. You can [push](#pushing-changes-to-git) and [pull](#pulling-changes-from-git) changes to and from your repository. Multiple Metabases can connect in Read-write mode, each working on [different branches](#branch-management).-- **Read-only mode for your production Metabase**: Read-only Metabases only [pull](#pulling-changes-from-git) changes, typically from your main branch. In Read-only mode, you can't edit Library content, create segments or measures on published tables, edit transforms, or create, edit, or delete [data apps](../../data-apps/build.md#ship-the-app-to-production-with-remote-sync). You can set up [auto-sync](#pulling-changes-automatically) to pull approved changes every five minutes. Keep your production Metabase in Read-only mode so that every change goes through Git.+- **Read-only mode for your production Metabase**: Read-only Metabases only [pull](#pulling-changes-from-git) changes, typically from your main branch. In Read-only mode, you can't edit Library content, create segments or measures on published tables, or edit transforms. You can set up [auto-sync](#pulling-changes-automatically) to pull approved changes every five minutes. Keep your production Metabase in Read-only mode so that every change goes through Git.### Content is stored as YAML files@@ -90,12 +90,14 @@ Create a personal access token with read and write repository access. Copy the t- **GitHub**: Create a [fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with **Contents: Read and write** and **Metadata: Read-only** permissions.- **GitLab**: In **User Settings** > **Personal access tokens**, [create a token](https://docs.gitlab.com/user/profile/personal_access_tokens/) with **read_repository** and **write_repository** scopes. Tokens have an expiration date (your admin may set a maximum lifetime).- **Bitbucket**: In your Bitbucket repository, go to **Repository settings** > **Security** > **Access tokens** and click **Create access token**. Give it a name and, under **Scopes**, select:+- **Repositories**: **Read** and **Write**- **Pull requests**: **Read** and **Write**Click **Create** and copy the token immediately, you can't view the token again after closing the dialog.The created token must have these scopes (visible in the **View access token** dialog after creation):+- `repository`- `repository:write`- `pullrequest`@@ -112,14 +114,17 @@ In the Metabase that you use for development:1. Go to **Admin** > **Settings** > **Remote sync**. You can also click **Set up remote sync** at the bottom of the Data Studio sidebar.2. Enter your repository URL:+- For example, `https://github.com/your-org/your-repo` or `https://bitbucket.org/your-workspace/your-repo` (note the `https`). The repository must already exist and be initialized with at least one commit.3. Select **Read-write mode**.4. Add your access token:+- Paste the personal access token (PAT) you created earlier. Make sure the token has [read and write permissions](#2-create-a-token-for-your-development-metabase). Metabase encrypts your token before storing it.5. Test the connection:+- Click **Test connection** to check whether Metabase can reach your repository. If the connection fails, make sure your token has the appropriate permissions and hasn't expired. If you copied the token incorrectly, generate a new one.- Metabase also checks the connection when you save your settings.@@ -148,12 +153,14 @@ Create a personal access token with read-only repository access. Copy the token- **GitHub**: Create a [fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with **Contents: Read-only** and **Metadata: Read-only** permissions.- **GitLab**: In **User Settings** > **Personal access tokens**, [create a token](https://docs.gitlab.com/user/profile/personal_access_tokens/) with **read_repository** scope only.- **Bitbucket**: In your Bitbucket repository, go to **Repository settings** > **Security** > **Access tokens** and click **Create access token**. Under **Scopes**, select:+- **Repositories**: **Read**- **Pull requests**: **Read**Leave Write and all other scope groups unchecked. Click **Create** and copy the token immediately.The created token must have these scopes (visible in the **View access token** dialog after creation):+- `repository`- `pullrequest`@@ -166,14 +173,17 @@ In your production Metabase:1. Go to **Admin** > **Settings** > **Remote sync**.2. Enter your repository URL:+- Use the same repository as your development Metabase, for example, `https://github.com/your-org/your-repo` (note the `https`).3. Select **Read-only mode**.4. Add your access token:+- Paste the read-only personal access token you created for this production Metabase.5. Test the connection:+- Click **Test connection** to check whether Metabase can reach your repository. If the connection fails, verify your token has the appropriate permissions and hasn't expired.- Metabase also checks the connection when you save your settings.@@ -313,7 +323,7 @@ Remote sync uses the same serialization format as the [Metabase CLI serializatio- Metrics- Dashboards and their cards- Documents-- [Data apps](../../data-apps/build.md#what-syncs-with-a-data-app). Metabase syncs the app's bundle and the Metabase items the app needs to run, not the app's source code. Keep the source code in your own repository so you can edit the app.+- [Data apps](../../data-apps/build.md#what-syncs-with-a-data-app). Metabase syncs the app's manifest, bundle, and collection, but ignores the app's source code. You (or your agent) commit all of these to the same repository, including the source code, so that you can edit the app over time.- SQL snippets- [Data actions](../data-actions.md)- The glossary@@ -501,7 +511,7 @@ To disable Remote sync:## Migrating existing content to Remote syncIf you already have content in your Metabase, you can adopt Remote sync gradually. Content that lives outside the Library remains unaffected. You can keep working with it normally while you move content into the Library over time.-+Make sure you move any dependencies (like models referenced by questions) into the Library, since [Library content must be self-contained](#library-content-must-be-self-contained).### If you already have a repo with serialized Metabase datadiff --git a/docs/databases/connections/mysql.md b/docs/databases/connections/mysql.mdindex c5c8668f6ce..ffcf2e796fb 100644--- a/docs/databases/connections/mysql.md+++ b/docs/databases/connections/mysql.md@@ -193,7 +193,7 @@ Set up an additional connection used for write operations. See [Writable connect## Data actions-Turn on **Data actions** to let people run actions on this database: both [actions on models](../../data-modeling/models/actions/introduction.md) and [data actions](../../data-modeling/data-actions.md). Actions can read, write, and delete data, so your database user needs write permissions.+Turn on **Data actions** to let people run actions on this database: [data actions](../../data-modeling/data-actions.md), actions in [data apps](../../data-apps/build.md), and [model actions](../../data-modeling/models/actions/introduction.md). Actions can read, write, and delete data, so your database user needs write permissions.## Model persistencediff --git a/docs/databases/connections/postgresql.md b/docs/databases/connections/postgresql.mdindex 509a86e03ce..557501793e8 100644--- a/docs/databases/connections/postgresql.md+++ b/docs/databases/connections/postgresql.md@@ -192,7 +192,7 @@ Set up an additional connection used for write operations. See [Writable connect## Data actions-Turn on **Data actions** to let people run actions on this database: both [actions on models](../../data-modeling/models/actions/introduction.md) and [data actions](../../data-modeling/data-actions.md). Actions can read, write, and delete data, so your database user needs write permissions.+Turn on **Data actions** to let people run actions on this database: [data actions](../../data-modeling/data-actions.md), actions in [data apps](../../data-apps/build.md), and [model actions](../../data-modeling/models/actions/introduction.md). Actions can read, write, and delete data, so your database user needs write permissions.## Model persistencediff --git a/docs/databases/users-roles-privileges.md b/docs/databases/users-roles-privileges.mdindex 8f655c5999a..45e192519e4 100644--- a/docs/databases/users-roles-privileges.md+++ b/docs/databases/users-roles-privileges.md@@ -96,7 +96,7 @@ This is a good option if you're connecting to a local database for development o## Privileges to enable actions and editable table data-Both [actions](../data-modeling/models/actions/introduction.md) and the [editable table data](../data-modeling/editable-tables.md) let Metabase write back to specific tables in your database.+Both [actions](../data-modeling/data-actions.md) and the [editable table data](../data-modeling/editable-tables.md) let Metabase write back to specific tables in your database.If you're using actions or editable tables, then in addition to the [minimum database privileges](#minimum-database-privileges), you'll need to grant write access to any tables you want to be able to write to.diff --git a/docs/databases/writable-connection.md b/docs/databases/writable-connection.mdindex f66c43adc43..f6ba36a03ab 100644--- a/docs/databases/writable-connection.md+++ b/docs/databases/writable-connection.md@@ -50,7 +50,7 @@ When configured, writable connection will be used for:- [Transforms](../data-modeling/transforms/transforms-overview.md)- [CSV uploads](../databases/uploads.md)- [Editable tables](../data-modeling/editable-tables.md)-- [Actions](../data-modeling/models/actions/introduction.md)+- [Actions](../data-modeling/data-actions.md)- [Model persistence](../data-modeling/models/model-persistence.md)Your writable connection will need to have the privileges required for these operations. See [Users, roles, and privileges](./users-roles-privileges.md).diff --git a/docs/permissions/database-routing.md b/docs/permissions/database-routing.mdindex 059121f4606..1cacdac13a4 100644--- a/docs/permissions/database-routing.md+++ b/docs/permissions/database-routing.md@@ -44,7 +44,7 @@ Database routing **can't be used** on databases with:- [Writable connections](../databases/writable-connection.md)- [Editable tables](../data-modeling/editable-tables.md)-- [Actions](../data-modeling/models/actions/introduction.md)+- [Actions](../data-modeling/data-actions.md#databases-that-support-data-actions)- [CSV uploads](../databases/uploads.md)- [Model persistence](../data-modeling/models/model-persistence.md)diff --git a/docs/permissions/row-and-column-security.md b/docs/permissions/row-and-column-security.mdindex 3b84bd15b93..8cc29d25425 100644--- a/docs/permissions/row-and-column-security.md+++ b/docs/permissions/row-and-column-security.md@@ -209,22 +209,22 @@ If you want to give someone access to multiple user IDs (e.g., the person should1. Create a SQL question that parses the comma-separated string and filters the table:- ```sql- {%raw%}- SELECT *- FROM users_with_values- WHERE user_id = ANY(STRING_TO_ARRAY(REGEXP_REPLACE(TRIM({{user_id}}), '\\s*,\\s*', ','), ','))- {% endraw %}- ```-- This query:-- - Trims whitespace from the user attribute value- - Replaces any spaces around commas with just commas- - Converts the comma-separated string to an array- - Filters rows where the user_id matches any value in the array-- The `STRING_TO_ARRAY()` and `REGEXP_REPLACE()` functions are PostgreSQL-specific. To see which functions your database supports, see your database's documentation.+ ```sql+ {%raw%}+ SELECT *+ FROM users_with_values+ WHERE user_id = ANY(STRING_TO_ARRAY(REGEXP_REPLACE(TRIM({{user_id}}), '\\s*,\\s*', ','), ','))+ {% endraw %}+ ```++ This query:++ - Trims whitespace from the user attribute value+ - Replaces any spaces around commas with just commas+ - Converts the comma-separated string to an array+ - Filters rows where the user_id matches any value in the array++ The `STRING_TO_ARRAY()` and `REGEXP_REPLACE()` functions are PostgreSQL-specific. To see which functions your database supports, see your database's documentation.2. Set up the row and column security using this SQL question. See [setting up column security](#setting-up-column-security).@@ -325,9 +325,9 @@ People in groups with row and column security can't create Slack [alerts](../que### People with row and column security can't run actions-If row and column security applies to a person on any table in a database, that person can't run [actions](../data-modeling/models/actions/introduction.md) on that database. Actions write to tables directly, so they would get around the row and column security. For basic actions and data actions made from a table, Metabase shows the error **You can't run actions on this database because row and column security applies to your data access.** For actions written in SQL, Metabase shows a generic permissions error.+If row and column security applies to a person on any table in a database, that person can't run [actions](../data-modeling/data-actions.md) on that database. Actions write to tables directly, so they would get around the row and column security.-[Public action forms](../data-modeling/models/actions/custom.md#make-public) don't check row and column security. An admin can make any action public, even on a database where row and column security applies to some groups, and anyone with the link can then run the action. Before you make an action public, make sure that it's OK for anyone to make that change to your data.+[Public action forms](../data-modeling/data-actions.md#share-a-data-action-as-a-public-form) don't check row and column security. An admin can make any action public, even on a database where row and column security applies to some groups, and anyone with the link can then run the action. Before you make an action public, make sure that it's OK for anyone to make that change to your data.## Further readingdiff --git a/docs/util/data/nav.yml b/docs/util/data/nav.ymlindex e521ff0836a..e6da52ce435 100644--- a/docs/util/data/nav.yml+++ b/docs/util/data/nav.yml@@ -122,6 +122,8 @@ categories:- name: "Data apps"url: "data-apps/start"pages:+ - name: "Getting started"+ url: "data-apps/getting-started"- name: "Build a data app"url: "data-apps/build"- name: "Manage data apps"@@ -255,7 +257,7 @@ categories:url: "data-modeling/models/models"- name: "Model persistence"url: "data-modeling/models/model-persistence"- - name: "Actions"+ - name: "Model actions"pages:- name: "Overview"url: "data-modeling/models/actions/introduction"