EZTABLE IDEAS 是 EZTABLE 成員揮灑熱情和大家分享專業及創意的網誌。 EZTABLE 讓消費者 24 小時都可以在網路訂位全台灣最優質的餐廳,同時提供餐廳經營者 e 化的訂位管理系統 (雲端、iPad、智慧型手機)

Interactive data

四月 22 2016 Published by under Engineering

At EZTABLE, we encourage a self-serving model when asking questions regarding our massive database. For example, an account manager might ask a question such as “What’s the average age of all customers who made reservations in February of 2015?". Any backend engineer could quickly translate the question into the corresponding SQL query and run it against out MySQL database, however that defies our purpose of being transparent and self-serving. So the key element that we need is “an interface that let everyone in our company to interactively ask questions and learn from data". Enter metabase.

Metabase is an open source project that provides:

  1. Easy to setup
  2. Let anyone on your team ask questions without knowing SQL syntax
  3. Rich & beautiful dashboards

Before jumping into the juicy details, let’s first quickly go through a relational data model 101.

  • Tables
  • Columns
  • Rows
  • Relationships

Fundamentally data are stored in a database, which is a huge collection of tables, conceptually similar to a large Excel document that contains lots of sheets. Tables contain one or more columns and rows.


Fig 1. A member table.

All the cells in a column contain the same type of information. For example, in the sample table below, the name column contains name in each cell and member_id column contains the member ID.

A bookings table.

Fig 2. A bookings table.

A tables can contain references to other tables, which establishes a relationship between them. For example, a database can lookup the age of members based on the member_id column from the booking table.

Fig 3. Relationships between tables.

Fig 3. Relationships between tables.

With metabase, everyone in the company can quickly produce statistics by looking up demographics or anything they want based on relationships. Don’t worry, sensitive informations are hidden away.

Fig 4. Commonly used tables.

Fig 4. Commonly used tables.

Let’s get back to the main topic. How can metabase help us answering questions such as “What’s the average age of all customers who made reservations in February of 2015″? Let’s see a little animation.


Fig 5. Metabase in action.

Fig 5. Metabase in action. Click to enlarge.


Each part of our question can be translated to a corresponding element on the user interface, which is simple enough that anyone within our organization to play with and answer their own questions.

Fig 6. Questions translated to metabase UI.

Fig 6. Questions translated to metabase UI.

There more tricks that metabse can do e.g.

  1. Drawing charts.
  2. Create a dashboard for big screens.
  3. Export daily report to email or slack.

Subscribe to EZTABLE IDEAS for more articles!


P.S. For those who use Facebook’s PrestoDB, Airbnb has release a similar tool called Airpal.

Related Posts Plugin for WordPress, Blogger...

No responses yet