title |
---|
Introduction to actions |
For now, actions are only available for PostgreSQL and MySQL.
Actions are entities in Metabase that let you build custom forms and business logic.
Actions let you write parameterized SQL that writes back to your database. Actions can be attached to buttons on dashboards to create custom workflows. You can even publicly share the parameterized forms that actions generate to collect data.
Here are a few ideas for what you can do with actions:
Actions must be added to a model, but actions only run on the raw tables that back those models (so actions will never edit your model definition).
For actions to work, you'll first need to do the following two things:
There are two types of actions:
There are multiple ways to run actions:
Just something to clarify here: actions, even though they are added to models, make their changes to the underlying table that a model queries. Which means that anyone who has access to the underlying table, or to questions or other models based on that table, will be able to see the effects of an action. Tools other than Metabase that are connected to that database will also pick up these changes.
In this sense, models are containers for actions; models are a way to organize actions. In fact, you could (in theory) add a custom action to a model that performs some update unrelated to its model's data. For example, you could write a custom action that updates the Accounts
table, and add that action to a model that only queries an unrelated table (e.g., the Orders
table). But, you know, maybe don't do that (unless you have a really good reason). Basic actions, however, are only be available for models that wrap a single raw table.
Before using actions in production, consider playing around with actions on some sample data (like the Sample Database included with Metabase) to get a feel for how they work.
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )