How to connect Trino data in PowerBI using JDBC-ODBC Bridge

Trino is an open source distributed SQL query engine designed for interactive analytic workloads. In this article, we will see how to connect Trino data in Power BI or other ODBC Apps that do not support direct JDBC connectivity. We will use ZappySys JDBC-ODBC Bridge for seamless integration with any JDBC driver like Trino.

Prerequisite

  1. Download and Install Docker with Trino Image (See detailed instructions in the next section)
  2. Download and Install ZappySys JDBC-ODBC Bridge
  3. Download Trino JDBC Driver. Here is the official Trino JDBC Driver page in case you like to read more.
  4. Refer to Video On this page for Basic Instructions on Java Install / Driver Setup

Installing Docker Desktop on Windows

For this demonstration, we’ll use a Trino instance running locally on Docker Desktop. In a real-world scenario, your Trino instance might be a managed service or run as a container or VM on a remote server or cloud service.

Step 1: Check System Requirements

  1. If you are running Windows 10, then the Pro or Enterprise version (64-bit) is preferred, as Docker Desktop relies on Hyper-V and WSL 2 for Windows.
  2. Virtualization should be enabled in your BIOS.

Step 2: Install Docker Desktop

  1. Download docker for windows from the official site and install
  2. Docker Desktop requires Windows Subsystem for Linux 2 (WSL 2) to run. The installer will prompt you to enable WSL 2 if it’s not already installed. Docker Desktop can install WSL 2 automatically, but if you encounter any issues, you might need to enable it manually.

Step 3: Install WSL 2 (if not already installed)

If WSL 2 isn’t set up on your machine, Docker Desktop will guide you through the installation process. Here’s how to do it manually:

Enable WSL feature: Open PowerShell as Administrator and run:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Enable Virtual Machine Platform: In PowerShell as Administrator, run:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Set WSL 2 as the default version: After installing, run the following command in PowerShell to set WSL 2 as the default version:

wsl --set-default-version 2

Installing and Running Trino Image in Docker

We will use a Docker image for this demo to host a sample Trino instance. In the real world, it can be hosted on a remote machine, cloud container, or Virtual Machine.

Checking Trino Instance - Cluster Status Page

Verify Trino connection

Once Trino is running, you can confirm or start via the command line, too

Setting up Trino ODBC Connection

  1. Open the ODBC Data Source by typing “ODBC” in the search box and launching the ODBC Data Source.
    Open ODBC Data Source

  2. To gain access for yourself or other users, go to the User DSN or System DSN. Go to the System tab for SQL Server Integration and add a new System DSN. Click the “Add” button.
    ZappySys ODBC Driver - Open UI

  3. From the Driver list Select ZappySys ODBC Driver. For this example, select [ZappySys JDBC Bridge Driver].
    ZappySys ODBC Driver - Create JDBC Bridge Driver

  4. Configure Trino ODBC connection like below and then click Test Connection

  5. Go to Preview Tab to query sample data.

  6. Click OK to save ODBC DSN.

Loading Trino Data in Power BI using JDBC-ODBC Connection

Now, we can use the ODBC Connection created in the previous step using the below steps. You can also enter a Direct Connection String in Power BI if you do not wish to use DSN.

  1. Open Power BI Desktop and click Get Data.

  2. In the Get Data window, search for ODBC, select it, and click Connect.
    Select ODBC in Power BI

  3. Select Trino DSN created in the previous section and click OK

  4. If prompted, authenticate using Windows Authentication or the required credentials, then click Connect.

  5. Choose Table you like to import (you can also enter custom Query (for query import see steps#3, expand Advanced options). Click Load

Conclusion

We saw how easy it is to connect Trino in Power BI or any other Non-Java apps. Click here to download ZappySys JDBC Bridge Driver and integrate JDBC Driver data in any Non-Java or ODBC Apps (e.g. Excel, Power BI, MS Access), enabling smooth data integration for reporting and analysis. If you encounter any issues or need further assistance, please get in touch with the ZappySys support team.