Author: Phoebe He (Content Developer at PingCAP)
Editors: Calvin Weng, Caitin Chen
Overview
TiDB Cloud is a fully-managed Database-as-a-Service (DBaaS) that brings everything great about TiDB to your cloud and lets you focus on your applications, not the complexities of your database.
In this 15-minute tutorial, you will learn how to connect TiDB Cloud to Metabase, an open source business intelligence (BI) tool. We will be using Metabase to build a BI dashboard and gain analytical insights using sample data from Capital Bikeshare (data released under the Capital Bikeshare Data License Agreement).
Before you begin
- Create a TiDB Cloud cluster and import the Capital Bikeshare sample data following the TiDB Cloud Quick Start Guide.
- Install Metabase by following these instructions. You’ll have the option of installing it on premise or in the cloud.
Get TiDB Cluster IP address
- Go to https://tidbcloud.com/console/clusters and sign in to your cluster.
- On the TiDB Cloud console, click Connect. On the upper right of the pane. The Connect to TiDB dialog displays.
- Create the traffic filter for the cluster. Depending on how you use Metabase, select a traffic filter from the following options:
- If you are using Metabase on a cloud platform, click Allow Access from Anywhere.
- Click Create Filter.Take note of the TiDB Cloud IP address, listed between the
-h
parameter and-P
parameter, as you will use it at a later step. For example:mysql -u root -h tidb.xxx.xxxxx.us-west-2.prod.aws.tidbcloud.com -P 4000 -p
Connect TiDB Cloud to Metabase
- Start the Metabase application and click Let’s get started.
- Select your preferred language in step 1 and click Next.
- Enter your information and account details in step 2 and click Next.
- In the Add your data step, click the Database type drop down menu and select MySQL.
- Specify the following settings
- Name:
Bikeshare
- Host:
<your_tidb_cloud_ip_address_obtained_in_the_previous_step>
- Port:
4000
- Name:
- Database name:
bikeshare
- Username:
root
- Password:
<password_of_your_tidb_cluster>
Here is an example:
- Username:
- Scroll down to the bottom and click Next.
- For the Usage data preference step, change your preference if needed and click Next.
- Click Take me to Metabase.
Build BI Dashboard
In this exercise we will be analyzing the sample data from Capital Bikeshare to identify the most popular type of bicycle.
- On the homepage of Metabase, scroll down to the OUR DATA section and click Bikeshare.
- Click the Trips table.
- Explore the trips table. This is the sample data set you imported to the TiDB Cloud cluster.
- To display how many records are associated with each rideable bike type, click the +Summarize button on the top right.
- Select Count as the metric and select Rideable Type for the Group by field.The bar chart displays immediately.We can see that docked bikes are the most popular bike type and electric bikes are the least popular kind of bike.
Want to learn more?
Ready to give TiDB Cloud a try? TiDB Cloud Developer Tier is now available! It lets you run a TiDB cluster for free for one year on Amazon Web Services. Make sure to follow us on Twitter to stay updated on TiDB Cloud news!
TiDB Cloud Dedicated
TiDB Cloudのエンタープライズ版。
専用VPC上に構築された専有DBaaSでAWSとGoogle Cloudで利用可能。
TiDB Cloud Serverless
TiDB Cloudのライト版。
TiDBの機能をフルマネージド環境で使用でき無料かつお客様の裁量で利用開始。