Metabase is the easy, open source way for everyone in your company to ask questions and learn from data.
Installing and Running Metabase:
Metabase is built and packaged as a Java jar file and can be run anywhere that Java is available. Below we provide detailed instructions on how to install and run Metabase in a variety of common configurations.
How to download it?
How to Running on Java 8:
Running on Java 8 is the easiest path to running Metabase. There are no additional parameters required, if launching from a Jar the below invocation will work:
Java -jar metabase.jar
How to Gathering your database info:
At this point you’ll need to gather some information about the database you want to use with Metabase. We won’t be able to connect to your database without it, but you’d like to deal with all of this later, that’s okay: just click I’ll add my data later.
If you’re ready to connect, here’s what you’ll need:
- The hostname of the server where your database lives
- The port the database server uses
- The database name
- The username you use for the database
- The password you use for the database
How to connect database:
Here in this screen you add the above information about the database.
Asking a new question:
But, enough about that — let’s get to asking questions. For the next few examples, we’ll be using the Sample Dataset that comes with Metabase.
Go ahead and click New Question at the top of the screen. Now we’re on the new question page. The bar that you see going across the page is what you’ll use to ask your questions. The “Select a table” dropdown should already be open, showing you a list of your database(s) and the tables within them.
Our first question:
We’re going to ask a question about the Orders table in the Sample Dataset database, so we’ll click on Orders in the dropdown. The Orders table has a bunch of fake data in it about product orders for a made up company. If you just want to see everything that’s in this table, you can click Run query and see all the raw data.
Let’s start with a simple question: how many orders have been placed with a subtotal (before tax) greater than $40? More precisely, this question translates to, “How many records (or rows) are in the table ‘Orders’ with a value greater than 40 in the Subtotal column?”
To find out, we want to filter the data by the field we’re interested in, which is Subtotal. Since each row in this table represents one order, counting how many rows there are after we’ve filtered them will give us the answer we want.
So, after we select Subtotal from the Filter dropdown we’ll get some options for the filter, and we’ll choose Greater than, type the number 40 in the box, and click Add Filter.
Next we need to tell Metabase what we want to see. Under the View dropdown, we’ll select Count, because, like we said, we want to count the total number of rows that match our filter. If we left the View set to Raw Data, that would just show us a list of all the rows, which doesn’t answer our question.
And our first answer:
We’re ready to ask our question, so let’s click the Run query button!
So it looks like there were 12,284 orders, each with a subtotal greater than $40.Another way of saying this is that there were 12,284 records in the table that met the parameters we set.
How to Changing the visualization:
Luckily enough, Metabase can present the answers to your questions in a variety of ways. To change the visualization, just select one of the options from the Visualization dropdown menu, which is in the top-left of the screen, above the table. Let’s choose Area.
Creating a dashboard:
Unless you went off and did your own thing, you shouldn’t have any dashboards yet, so you’ll see a dialog that prompts you to create a new one and give it a name and description. Name it anything you’d like. We’ll call ours “My First Dashboard.”
Dashboards are great when you have a set of questions and answers that you want to view together. Your saved questions will be displayed as cards on the dashboard, which you can resize and move around to your heart’s content.
So, after you click the button to create your dashboard, you should see your fancy saved question as a little card.
If you’re feeling up to it, you can click the edit button in the top-right of the screen (the one that looks like a pencil), and that’ll let you move and resize your saved question so you can get it looking just how you want it. Just click Save in the top-right when you’re done. We’ll make ours a bit wider to let those data points breathe.