☁️Trino and Metabase Connection on Huawei Cloud CCE (Kubernetes)
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?
- Log in or register to Huawei Cloud with this article.
- Create a CCE service
- Connection the CCE service with kube config.
- Install kubectl and k9s.
How to Deploy Trino with Helm?
- 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
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.
3. Then check on the Huawei Cloud console CCE page.
4. Modify network settings. Go to the network page on the left menu. Update trino service.
5. Login with EIP addresses and port information.
· Reference: https://github.com/trinodb/charts
Trino Catalog Configuration
- Update trino-catalog configmap for metabase.
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
How to Deploy Metabase with Helm?
- Add helm repo like trino step and update repo.
helm repo add metabase https://pmint93.github.io/helm-charts
helm repo update
2. Then update network properties.
3. Metabase needs pvc. This setting is like below:
Reference: https://artifacthub.io/packages/helm/pmint93/metabase
How do we connect Trino and Metabase?
- Install plugin
cd plugins/
wget https://github.com/starburstdata/metabase-driver/releases/download/3.0.1/starburst-3.0.1.metabase-driver.jar
2. Refresh the metabase web UI. Then set up a metabase like the below images.
3. Click next, and continue the setup.
4. NOTE: Admin password must be empty
5. Last setup page;
6. Finally, you can start using trino integrated with Metabase.
7. Create a query. If you have imported it to your db-trino. You can create and run a query for your datasets.
8. If you don't have a database. you can check Kubernetes pod logs. you must see the same log as the below image.
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.