# Trino

Distributed SQL query engine

- Category: Data warehouses
- Runs in: the Phloem cloud

Lets you and Hamming query a Trino catalog with SQL, with its tables listed in Trace.

## What Phloem reads
- Tables and views in every schema of the catalog, with their columns, listed in Trace for Hamming and SQL autocomplete
- `information_schema` is left out

## What you need
- The coordinator's hostname and HTTP or HTTPS port, reachable from Phloem
- The catalog to read
- A Trino username, plus a password if the cluster uses password sign-in

## Connect
1. In the console, open **Connectors**, choose **Add connector**, then **Trino**.
2. Enter **Host**, **Port** and **Catalog**. Optional: a default **Schema** (default `default`).
3. Enter **Username**, and **Password** if your cluster needs one.
4. Check **Use SSL/HTTPS** to connect over HTTPS. Clear **Verify SSL Certificate** only for a self-signed certificate.
5. Choose **Test Connection**, then **Create Connection**.

## What Hamming can do
- Run SQL that you or Hamming write, as the username you entered

## Notes
- One connector reads one catalog. Add a connector for each catalog you want in Trace.
- Phloem runs any statement, not only `SELECT`. Give the user read-only access in Trino to keep the connector read-only.

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Host | Text | Yes | Trino coordinator hostname |
| Port | Number | Yes | HTTP/HTTPS port |
| Catalog | Text | Yes | Default catalog to connect to |
| Schema | Text | No | Default schema (optional) |
| Username | Text | Yes | Username for authentication |
| Password | Secret | No | Password (optional, for basic auth) |
| Use SSL/HTTPS | On / off | No | Connect using HTTPS |
| Verify SSL Certificate | On / off | No | Verify SSL certificate (disable for self-signed certs) |
