☁️Trino and Metabase Connection on Huawei Cloud CCE (Kubernetes)

Rabia Yılmaz
Huawei Developers
Published in
5 min readDec 7, 2023
Huawei Cloud CCE Service

Introduction

Welcome to the ultimate guide on connecting Trino and Metabase to Huawei Cloud! By the end of this tutorial, you will be able to set up, deploy, and integrate Trino and Metabase with Kubernetes.

What is Trino?

Let’s begin by exploring the fundamentals of Trino and its connection to Huawei Cloud. Trino is a distributed SQL query engine that allows users to interact with data stored in various databases. With its compatibility, performance, and scalability, Trino is the perfect choice for working with large-scale datasets in Huawei Cloud.

What is Metabase?

Metabase is an open-source business intelligence tool that simplifies exploring and understanding data. By connecting Metabase to Trino, you can use Trino’s advanced SQL features in combination with Metabase’s data visualization capabilities. This allows you to create visually appealing and informative reports and dashboards for data analysis and presentation.

How to create and connect the Kubernetes Environment on Huawei Cloud?

  1. Log in or register to Huawei Cloud with this article.
  2. Create a CCE service
  3. Connection the CCE service with kube config.
  4. Install kubectl and k9s.

How to Deploy Trino with Helm?

  1. Add the Trino Helm repository to your Helm client and Update your Helm repositories to ensure you have the latest chart:
helm repo add trino https://trinodb.github.io/charts/
helm repo update
helm repo for Trino

2. Install the Trino chart in your Kubernetes cluster:

helm install trino-coordinator trino/trino --version 0.7.1 -f values.yaml

## In this command, replace values.yaml with the path to your own configuration file.
Install trino

3. Then check on the Huawei Cloud console CCE page.

Check trino

4. Modify network settings. Go to the network page on the left menu. Update trino service.

Service update

5. Login with EIP addresses and port information.

Trino home page

· Reference: https://github.com/trinodb/charts

Trino Catalog Configuration

  1. Update trino-catalog configmap for metabase.
Trino catalog configuration
connector.name=hive
hive.metastore.uri=thrift://Metastoreipaddress:9083
hive.s3.aws-access-key=your access key # hwc AK
hive.s3.aws-secret-key=yur secret key # hwc SK
hive.s3.ssl.enabled=false
hive.s3.path-style-access=true
Metabase

How to Deploy Metabase with Helm?

  1. Add helm repo like trino step and update repo.
helm repo add metabase https://pmint93.github.io/helm-charts
helm repo update
Helm repo for Metabase

2. Then update network properties.

metabase service update

3. Metabase needs pvc. This setting is like below:

Metabase PVC configuration

Reference: https://artifacthub.io/packages/helm/pmint93/metabase

How do we connect Trino and Metabase?

  1. Install plugin
cd plugins/
wget https://github.com/starburstdata/metabase-driver/releases/download/3.0.1/starburst-3.0.1.metabase-driver.jar
Metabase plugin

2. Refresh the metabase web UI. Then set up a metabase like the below images.

The Metabase setup page on the browser

3. Click next, and continue the setup.

setup page 2

4. NOTE: Admin password must be empty

5. Last setup page;

Metabase page

6. Finally, you can start using trino integrated with Metabase.

Metabase home page

7. Create a query. If you have imported it to your db-trino. You can create and run a query for your datasets.

Metabase query example

8. If you don't have a database. you can check Kubernetes pod logs. you must see the same log as the below image.

Kubernetes metabase pod logs.

Conclusion

In conclusion, by following this tutorial, you will have successfully connected Trino and Metabase to Huawei Cloud’s Container Container Engine (Kubernetes). This will enable you to leverage the full potential of Trino’s advanced SQL features and Metabase’s data visualization capabilities to explore, visualize, and analyze your data stored in Huawei Cloud’s Kubernetes.

Huawei Cloud Services

References

--

--