Metabase Query



  1. Metabase Query Definition
  2. Metabase Query Language
  3. Metabase Query Builder
  4. Metabase Query Interview
  5. Metabase Query Parameters
  6. Metabase Query Code
v0.39.0.1 / Users Guide / 01 What Is Metabase

What is Metabase?

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

Your questions can be saved for later, making it easy to come back to them, or you can group questions into great looking dashboards. Metabase also makes it easy to share questions and dashboards with the rest of your team.

Finding your way around

Panoply automatically organizes data into query-ready tables and connects to popular BI tools like Metabase as well as analytical notebooks. From executives to analysts, your entire team will have access to the most up-to-date data and insights they need to drive. + 018b068 satellite/metabase: different queries for deleteexpired + 6a553ec web/satellite: change banner for beta satellites with URLs + 36bc17e satellite/metainfo/metabase: add etag column to segments table.

So, you’ve gotten Metabase up and running and connected it to your data. It’s time to give you the lay of the land.

The home page

Metabase Query

Fresh out of the box, Metabase will show you a few things on the home page:

  • Some automatic explorations of your tables that you can look at and save as a dashboard if you like any of them. (Administrators can permanently hide this section by clicking the X that appears on hover.)
  • An area where things you or your teammates create will show up, along with a link to see all the dashboards, questions, and pulses you have.
  • A list of the databases you’ve connected to Metabase. (As with x-rays, administrators can permanently hide this section by clicking the X that appears on hover. You can always click on “Browse Data” from the main nav bar to see your databases and tables.)

Install docker compose ubuntu 19.10. Once you’ve created some dashboards, any of them that you pin in the main “Our analytics” collection will show up on the homepage for all of your teammates, so that when they log in to Metabase they’ll know right where to go.

Browse your data

Metabase Query Definition

If you connected your database to Metabase during setup, you’ll see it listed at the bottom of the homepage along with the sample dataset that Metabase comes with. Click on a database to see its contents. You can click on a table to see its rows, or you can also click on the bolt icon to x-ray a table and see an automatic exploration of it, or click on the book icon to go to the data reference view for that table to learn more about it.

Metabase Query Language

Metabase

Explore your analytics

As you and your team create dashboards and collections, they’ll start to show up on the homepage. Click on a collection in the “Our analytics” section to see its contents, or click “browse all items” to see everything you and your team have made. More about exploring

Ask a question or write a query

Click the Ask a question button in the top-right of Metabase to start a new simple exploration of one of your tables, ask a more detailed custom question using the notebook editor, or write a new SQL query if you want to really dig in. Os x yosemite iso.

Make a new dashboard or pulse

In Metabase, dashboards are made up of saved questions that you can arrange and resize as you please. They’re a great way to track important metrics and stats that you care about. Pulses are what regularly scheduled reports are called in Metabase. They can be sent out either via email, Slack, or both.

To make a dashboard or pulse, click the plus (+) icon in the top-right of the main navigation bar.

Use search to quickly find things

The search bar at the top of the screen helps you find tables, dashboards, collections, saved questions, metrics, segments, and pulses in an instant.

A primer on databases

To fully understand how to use Metabase, it’s useful to have at least a high-level understanding of databases, so we’ll discuss the basics of databases next.

v0.39.0.1 / Users Guide / Writing Sql

Asking more advanced questions in the SQL/native query editor

If you ever need to ask questions that can’t be expressed using the question builder, you can use SQL Hackintosh mountain lion download. instead.

What’s SQL?

SQL (pronounced “sequel”) stands for Structured Query Language, and is a widely used standard for getting data from databases. We won’t try to teach you all about SQL in this guide, but to learn more about it, check out this SQL Tutorial.

Even if you don’t understand SQL or how to use it, it’s worthwhile to understand how works inside Metabase because sometimes other people will share SQL-based questions that might be useful to you.

Starting a new SQL query

If you have the permissions to use the SQL editor, when you click the Ask a Question button you’ll see an option to start a new SQL query. There’s also a shortcut to the editor in the top nav bar; it’s the little console icon.

You can write SQL (or your database’s native querying language) directly into the editor that appears.

To try it out, select the Sample Dataset, then type the command select sum(subtotal), created_at from orders group by created_at. Don’t worry if you don’t understand this just yet. Click the blue run button and note the table that comes back is the same as if you had asked for the sum of Subtotal in the Orders table, grouped by Created At.

Tip: You can run your SQL query by pressing ctrl + enter on Windows and Linux, or ⌘ + return on a Mac. You can also run only the selected section of a query by highlighting the part you’d like to run before clicking the run button or using the run shortcut key.

Metabase Query Builder

Questions asked using SQL can be saved, downloaded, or added to a dashboard just like questions asked using the question builder.

Metabase Query Interview

Using SQL filters

Metabase Query

If you or someone else wrote a SQL query that includes variables, your question might have filter widgets at the top of the screen. Filter widgets let you modify the SQL query before it’s run, changing the results you might get.

Writing SQL queries that use variables or parameters can be very powerful, but it’s also a bit more advanced, so that topic has its own page if you’d like to learn more.

SQL snippets

You can use SQL snippets to save, reuse, and share SQL code across multiple questions that are composed using the SQL editor.

Learn more

  • Best practices for writing SQL queries.

Metabase Query Parameters

Next: Creating charts

Metabase Query Code

Now that you have an answer to your question, you can learn about visualizing answers.