Lesson

A tour of Metabase

Metabase is a deep product with a lot of tools to simplify business intelligence, from embeddable charts and interactive dashboards, to GUI and SQL editors, to auditing and data sandboxing, and more.

This is the “what comes in the box when you install Metabase” article. Metabase has a lot of tools in its toolkit (and we can’t cover everything here), but even seasoned Metabasers will benefit from a tour of its feature set - especially since we add major new features at a regular clip.

<em>Fig. 1</em>. The Metabase home page.
Fig. 1. The Metabase home page.

But first, what is Metabase?

What is Metabase?

Metabase is an open-source business intelligence tool. Metabase lets you ask questions about your data, and displays answers in formats that make sense, whether that’s a bar chart or a detailed table.

You can save your questions, and group questions into handsome dashboards. Metabase also makes it easy to share questions and dashboards with the rest of your team.

At a high level, we’ll walk through the features that let you:

How to query and visualize your data

Metabase supports a lot of different databases, and ships with a Sample Database for you to play around with. And once you’ve connected your data sources, Metabase gives you a lot of tools to explore them.

Ask questions

Query builder

You can use Metabase’s query builder to filter and summarize data.

Use the Notebook editor to ask more sophisticated questions. With custom expressions, you can accomplish pretty much anything you’d be able to do with SQL: join tables, create custom columns, filter and group results, compare time series, and more. Plus, people who don’t know SQL can duplicate your question and use it as a starting point for another question.

<em>Fig. 2</em>. The Notebook editor.
Fig. 2. The Notebook editor.

Query builder questions automatically get an action menu applied to their visualizations, allowing people to click on a table or chart to drill through the data.

<em>Fig. 3</em>. Using the <strong>Action Menu</strong> to zoom in on a chart, then view the rows that make up an aggregate value.
Fig. 3. Using the Action Menu to zoom in on a chart, then view the rows that make up an aggregate value.

Questions asked with the query builder can start with a model, a raw table, or with the results of a saved question, and you can convert them to native SQL at any time.

Native queries

Use the native query editor to compose questions in the database’s native query languages (typically SQL for relational databases, but also other query languages for data sources like MongoDB and Google Analytics). For questions written in SQL, you can use variables in your code to create SQL templates, including field filter variables that can create smart dropdown filters.

<em>Fig. 4</em>. A handy data reference tab shows information about your tables in the sidebar.
Fig. 4. A handy data reference tab shows information about your tables in the sidebar.

Like query builder questions, you can use the results of models or saved questions as starting points for new questions, just as you would a table or view. For example, to reference question 123 like so:

WITH gizmo_orders AS #{123}

Create models to use as starting data for new questions

Models are built with questions from either the query builder or the SQL editor. You can use them to pull together data from multiple tables, with custom, calculated columns, and column descriptions and other metadata, to create great starting data for people to ask new questions. For example, you could build a model for “Active users”, or “Priority orders”, or however you want to model your business.

If you find that you’re using the same saved question over and over as your starting data for new questions, you may want to convert that saved question to a model, which will let you add metadata like column descriptions and column types. You can also refer to models in SQL queries, just like we did above with saved questions.

Visualize results

When you ask a simple or custom question, Metabase will guess at the most appropriate visualization type for the results, but you can select from sixteen different visualization options.

<em>Fig. 5</em>. Select from 16 different chart types to visualize your results.
Fig. 5. Select from 16 different chart types to visualize your results.

Additionally, each visualization type has their own set of options to customize. You can even add custom maps to your Metabase instance.

Alerts

Set up an alert to get notified when your results meet a goal.

How to embed charts and share your results

Once you’ve asked questions, it’s time to present your analysis.

Create interactive dashboards

You can organize questions and models into a dashboard, and contextualize them with Markdown text cards.

<em>Fig. 6</em>. Example dashboard with two filters: date and state.
Fig. 6. Example dashboard with two filters: date and state.

You can add filters to dashboards and connect them to fields on questions to narrow the results.

<em>Fig. 7</em>. Connect a filter to multiple cards on a dashboard by specifying the field to filter.
Fig. 7. Connect a filter to multiple cards on a dashboard by specifying the field to filter.

You can link filters, create custom destinations (to send people to another dashboard or external URL), or even have a chart update a filter on click.

To keep people posted on key metrics, you can set up dashboard subscriptions via email or Slack.

<em>Fig. 8</em>. Set up a dashboard subscription to email or Slack results on a regular basis.
Fig. 8. Set up a dashboard subscription to email or Slack results on a regular basis.

Embed questions and dashboards

You can embed charts and dashboards using iframes. On some paid plans, you can even embed the full Metabase app, which allows you to do things like deliver multi-tenant, self-service analytics.

How to find things and stay organized

Things in this case being databases and their analysis: the questions, dashboards, and collections you and your teams create.

You know, to find things: data, metrics, segments, dashboards, models, and questions. You’ll probably use the search bar the most often, but the catch here is that you need to know what to search for.

Organize with collections

Collections organize questions, models, dashboards, and other collections. They work like folders on a file system, and you can set permissions on collections, giving some groups edit, view, or no access. Groups with edit access to a collection can pin the most important items to the collection - your “official” dashboards.

<em>Fig. 9</em>. Collections group questions and dashboards. You can set permissions on collections via groups.
Fig. 9. Collections group questions and dashboards. You can set permissions on collections via groups.

Events and timelines

<em>Fig. 10</em>. An event plotted on a time series.
Fig. 10. An event plotted on a time series.

Events and timelines let you capture important dates and make that knowledge available when you need it (that is, when you’re viewing a time series). You can organize events into timelines, and associate those timelines with collections.

Browse data

The data browser lists all of your databases, and gives you space to add context. You can browse tables and their fields, see sample data, as well as a list of questions that query that data.

<em>Fig. 11</em>. Browse data to explore databases, tables, and fields.
Fig. 11. Browse data to explore databases, tables, and fields.

X-rays

To give you a head start on asking questions, Metabase can X-ray a table for you.

<em>Fig. 12</em>. Part of an X-ray of the Sample Database's Orders table.
Fig. 12. Part of an X-ray of the Sample Database's Orders table.

These X-rays will generate a bunch of questions that slice the table’s records in different ways. You can save the X-ray as a dashboard, take out any questions that don’t interest you, add new questions, or just use the X-ray to get a feel for the table.

Activity feed and recently viewed

The activity feed lets you see what other people have been creating (provided you’re in a group with access to the relevant collection), as well as your recently viewed questions and dashboards.

<em>Fig. 13</em>. Click on the gears icon and select <strong>Activity</strong> to view recent activity and your recently viewed questions and dashboards.
Fig. 13. Click on the gears icon and select Activity to view recent activity and your recently viewed questions and dashboards.

How to configure Metabase

Permissions, localization, data modeling: with great power comes great responsibility.

Settings

<em>Fig. 14</em>. The <strong>Settings tab</strong> in the <strong>Admin Panel</strong>.
Fig. 14. The Settings tab in the Admin Panel.

You can set up email and Slack integrations, customize locale settings like language and currencies, and configure authentication with Google Sign-In or LDAP, or on some paid plans: JWT or SAML.

Data modeling

Metabase will try to guess how to display the various fields in your tables, but if you want more control, you can customize how Metabase handles each field, setting field visibility, type, formatting, and more.

<em>Fig. 15</em>. Customize how Metabase displays tables and their fields.
Fig. 15. Customize how Metabase displays tables and their fields.

Admins can also create segments and metrics for commonly used business definitions, like Active Users, Churned Users, or New Products, so that your analysis will have a shared vocabulary across teams.

<em>Fig. 16</em>. Example Segment that captures how the company defines a new product.
Fig. 16. Example Segment that captures how the company defines a new product.

You can do the same kind of standardization for SQL questions by codifying SQL code in snippets, which on some paid plans you can organize with folders and permissions.

Auditing

Auditing is only available on Pro and Enterprise plans (both self-hosted and on Metabase Cloud).

If you need to see what everyone’s looking at, check out auditing.

Group permissions for data and collections

Create groups in Metabase, add people to those groups, and give the groups different levels of access to databases and collections.

<em>Fig. 17</em>. Add permissions to databases and collections using groups.
Fig. 17. Add permissions to databases and collections using groups.

Some plans also include the ability to set application-level permissions: who can edit Metabase settings, view logs and debugging tools, and other application-level features.

Data sandboxing

Data sandboxing is only available on Pro and Enterprise plans (both self-hosted and on Metabase Cloud).

If you need granular control over who can see what, check out the data sandboxing feature to learn how you can restrict table access by row and by column.

Submit a PR, or fork the source code

Metabase is open source, so if Metabase lacks a feature you need, you can always build it yourself. Check out our releases to see the features we’ve added recently, and the roadmap for what we’re working on next.

Further reading

Thanks for your feedback!

Get articles like this one in your inbox every month