a

Trino Integration with Knowi: Unified Analytics Across Distributed SQL Engines

TL;DR

Knowi natively supports Trino, a powerful distributed SQL engine that lets you query data from multiple sources, relational, NoSQL, or otherwise, through a single interface. With Knowi’s integration, you can:

  • Connect to Trino in minutes (via UI or Cloud9Agent)
  • Run native Trino SQL queries or use a no-code Visual Query Builder
  • Join Trino data with MongoDB, PostgreSQL, MySQL, and more
  • Build dashboards and reports without writing code
  • Automate real-time reporting and share insights effortlessly

Start a free trial  to query Trino with Knowi today – no credit card required.

Table of Contents

What Is Trino?

Trino (formerly PrestoSQL) is an open-source distributed SQL query engine built for running fast analytic queries across multiple data sources of varying formats and structures. Trino supports federated queries across:

  • Relational databases (e.g., MySQL, PostgreSQL)
  • Data warehouses (e.g., Redshift, BigQuery)
  • NoSQL systems (e.g., Cassandra, MongoDB)
  • File systems and object storage (e.g., HDFS, S3)

This makes Trino an ideal backend for organizations with hybrid data architectures, especially when paired with Knowi for self-service BI and embedded analytics.

Why Use Trino with Knowi?

FeatureBenefit
Native Trino SQL supportWrite and execute Trino queries without switching tools
AI AssistantGenerate and explain Trino queries in natural language
Multi-source joinsJoin Trino datasets with SQL, NoSQL, API, or document sources
Dashboards & VisualizationsBuild real-time dashboards without writing code
Alerts & AutomationsGet notified or trigger workflows from Trino query results
Secure accessUse Cloud9Agent to connect to internal Trino clusters securely

How to Connect Trino to Knowi

Knowi supports two connection modes for Trino:

1. UI-Based Trino Integration

Best for publicly accessible Trino coordinators.

Steps:

  1. Go to Knowi > Data Sources > + New Datasource
  2. Select Trino
  3. Fill in the connection fields:
FieldDescription
Datasource NameFriendly name for the source
Hostname/IPTrino coordinator address
PortUsually 8080
CatalogE.g., tpch, mysql, hive
SchemaOptional but recommended
Username / PasswordIf authentication is required
PropertiesOptional connection params (e.g., SSL)

Click Test Connection, then Save

Note: If your Trino instance is inside a private network, use the Cloud9Agent method below.

2. Cloud9Agent Integration (for Internal Trino Clusters)

If your Trino instance isn’t publicly accessible, deploy Knowi’s Cloud9Agent inside your network to tunnel the connection.

Cloud9Agent Configuration Example:

datasource1.name=Internal Trino Cluster
datasource1.type=TRINO
datasource1.host=trino-coordinator.internal
datasource1.port=8080
datasource1.catalog=hive
datasource1.schema=analytics
datasource1.username=admin
datasource1.password=your_password
datasource1.useSSL=true
datasource1.properties=SSL=true&SSLVerification=NONE

Querying Trino in Knowi

Once connected, you can use either the Visual Builder or Query Editor to build Trino queries.

Visual Query Builder

Perfect for non-technical users:

  • Drag & drop fields
  • Apply filters, joins, aggregations visually
  • Preview data instantly
  • Auto-generates Trino SQL in the background

SQL Query Editor

Ideal for power users:

-- Join across Trino catalogs
SELECT c.custkey, c.name, o.orderdate, o.totalprice
FROM tpch.sf1.customer c
JOIN tpch.sf1.orders o ON c.custkey = o.custkey
WHERE o.orderdate > DATE '2024-01-01'
ORDER BY o.totalprice DESC
LIMIT 100

-- Cross-catalog join
SELECT m.user_id, p.total_orders
FROM mysql.users.members m
JOIN postgresql.analytics.purchasesummary p ON m.userid = p.customer_id
WHERE p.total_orders > 10

AI Features for Trino Users

Knowi’s built-in AI Assistant makes querying even easier:

FeatureWhat It Does
Generate QueryDescribe what you want in plain English
Explain QuerySee a plain-language breakdown of your SQL
Find IssuesDetect query issues or optimizations
Syntax HelpGet Trino-specific SQL guidance

Data Execution Options

Choose between:

  • Direct Query: Run real-time queries against Trino
  • Cached Dataset: Store results for faster load times

Great for high-volume dashboards or reports with predictable metrics.

Advanced Features

Session Properties

Improve query performance by setting Trino session properties:

SET SESSION distributed_join = true;
SET SESSION query_max_memory = '8GB';
SELECT * FROM large_table JOIN another_table ...

Schema & Catalog Explorer

  • Browse available catalogs and schemas
  • View column names and data types
  • Generate sample queries with right-click

Best Practices for Trino Analytics in Knowi

  • Specify schema: Avoid scanning unnecessary catalogs
  • Push filters: Apply WHERE clauses early to reduce data scanned
  • Monitor performance: Use Trino’s Web UI to analyze query execution
  • Secure your setup: Prefer Cloud9Agent for private environments

Common Troubleshooting Scenarios

IssueSolution
Connection TimeoutCheck firewall and network access for Knowi
Auth ErrorsVerify username/password or SSL settings
Missing CatalogConfirm catalog exists and is correctly spelled
SSL ErrorsCheck SSL=true and certificate configuration

Get Started with Trino + Knowi

Trino gives you the freedom to query anywhere. Knowi makes that power accessible to everyone, from business users to data engineers.

Book a Personalized Demo to See Trino + Knowi in Action

Frequently Asked Questions

Can I query across multiple Trino catalogs in Knowi?

Yes! You can join tables from different catalogs like mysql, hive, or postgresql using native Trino SQL.

What if my Trino cluster is not publicly accessible?

Use Knowi’s Cloud9Agent to securely connect to internal or on-prem Trino clusters.

Is Knowi compatible with Trino authentication and SSL?

Yes, Knowi supports credentials and custom properties like SSL=true and verification settings.

Can I blend Trino data with other sources like MongoDB?

Absolutely. Knowi enables cross-source joins between Trino, NoSQL (MongoDB, Elasticsearch), REST APIs, and more.

How do I monitor query performance?

Use Trino’s built-in Web UI for metrics and logs, and optimize queries via Knowi’s session properties and AI assistant.

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email
About the Author:

RELATED POSTS