> ## Documentation Index
> Fetch the complete documentation index at: https://ngquct-docs-fix-500-query-results.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Trino

> Catalogs and schemas, type mapping, EXPLAIN variants, and the auth a Trino cluster accepts

export const name_0 = "Trino"

export const plugin_0 = "Trino Driver"

What a write does depends on the catalog's connector, not on TablePro. A statement built correctly here can still come back as `NOT_SUPPORTED` because the connector behind that catalog is read-only or implements only part of SQL.

<Frame caption="The Trino connection form with a catalog set">
  <img className="block dark:hidden" src="https://mintcdn.com/ngquct-docs-fix-500-query-results/0TDhsORsgVLO0zL5/images/trino-connection-form.png?fit=max&auto=format&n=0TDhsORsgVLO0zL5&q=85&s=898f2c65e06181ac73ab8049fe4b3664" alt="Trino connection form" width="1560" height="960" data-path="images/trino-connection-form.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/ngquct-docs-fix-500-query-results/0TDhsORsgVLO0zL5/images/trino-connection-form-dark.png?fit=max&auto=format&n=0TDhsORsgVLO0zL5&q=85&s=60158871af07283f2d76a18a5ad70e7b" alt="Trino connection form" width="1560" height="960" data-path="images/trino-connection-form-dark.png" />
</Frame>

## Quick setup

Click **Create Connection…**, select **Trino**, enter the coordinator host and port, set **Username**, and click **Save & Connect**. A cluster with no authentication needs nothing else, and **Catalog** and **Schema** are optional starting points.

The {name_0} driver is not in the app. Picking {name_0} in the **Choose a Database** sheet offers the
download before the form opens, and opening a saved {name_0} connection installs it without asking.
**Settings > Plugins > Browse > {plugin_0}** installs it up front. See [Plugins](/features/plugins).

## Connection settings

| Field                       | Description                                                                                  |
| --------------------------- | -------------------------------------------------------------------------------------------- |
| **Host**                    | Trino coordinator hostname                                                                   |
| **Port**                    | Default `8080`, or `8443` when the coordinator serves HTTPS                                  |
| **Username**                | The user the query runs as                                                                   |
| **Catalog**                 | Default catalog for unqualified table names. Optional; empty browses every catalog           |
| **Schema**                  | Default schema. Optional                                                                     |
| **Auth Method**             | Authentication pane. `Username & Password` or `JWT Access Token`                             |
| **Password / Access Token** | The credential the chosen method needs: the account password, or the JWT in **Access Token** |
| **Time Zone**               | Advanced pane. Optional IANA zone (`America/New_York`) for the session                       |

## Connection URL

```text theme={null}
trino://user@host:8080/catalog
```

**Import from URL…** accepts the scheme; macOS does not route `trino://` links. See [Connection URL Reference](/connections/urls).

## Authentication

Trino refuses password and JWT credentials over plain HTTP, so both need an SSL mode set.

| Method                  | What is sent                                                                                                                                    |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **Username & Password** | HTTP Basic auth, for LDAP or password-file authentication                                                                                       |
| **JWT Access Token**    | The token as a bearer credential                                                                                                                |
| Client certificate      | The **Client Certificate** and **Client Key** from the SSL pane, for mutual TLS. Works with any SSL mode, and nothing is presented with SSL off |

## Catalogs, schemas, and tables

A connection opens on a catalog and schema, and every query can still name objects in full as `catalog.schema.table`:

```sql theme={null}
SELECT * FROM hive.web.clicks JOIN postgres.public.users USING (user_id);
```

Expand a catalog in the sidebar for its schemas, then a schema for its tables, with materialized views alongside tables and views. Row counts come from `SHOW STATS`. A tab bound to a second catalog keeps the same session; the catalog rides on each request.

Identifiers are quoted with double quotes. Results page with `OFFSET n ROWS FETCH NEXT m ROWS ONLY`, the order Trino's grammar requires.

## Types

* `bigint` and `decimal` are read as exact text, not floating point.
* `varbinary` is shown as hex.
* `array`, `map`, and `row` are shown as JSON, and `json` opens in the JSON viewer.
* `timestamp`, `time`, and their `with time zone` forms keep the value the server returned.

## Editing rows and schema

Cell edits become `INSERT`, `UPDATE`, and `DELETE`. Values carry their Trino type, so a `varchar` holding digits stays quoted, and columns that cannot be compared with `=` (`array`, `map`, `row`) stay out of the `WHERE` clause.

<Danger>
  Editing one of two identical rows changes both, and deleting one deletes both. With no primary keys reported, a row edit matches on every column of the row as it was read, and there is no transaction to roll it back. Check for duplicates before editing a table with no unique column.
</Danger>

The Structure tab creates tables and adds, drops, renames, and retypes columns, in autocommit. A type change is the operation fewest connectors accept.

## Session and query control

`SET SESSION` in the editor holds for the rest of the connection: the properties the coordinator reports back are sent with every later request, and `RESET SESSION` clears one. **Query > Cancel Query** (`Cmd+.`) tells the coordinator to kill the running query, which matters where a runaway query burns real compute.

## EXPLAIN variants

Click the Explain dropdown in the query editor to choose:

| Variant                   | Statement                                                                 |
| ------------------------- | ------------------------------------------------------------------------- |
| **Explain (Logical)**     | `EXPLAIN`, the logical plan                                               |
| **Explain (Distributed)** | `EXPLAIN (TYPE DISTRIBUTED)`, the plan split into stages                  |
| **Explain (IO)**          | `EXPLAIN (TYPE IO)`, the tables and columns the query reads               |
| **Explain (Validate)**    | `EXPLAIN (TYPE VALIDATE)`, parses and validates without running the query |
| **Explain Analyze**       | `EXPLAIN ANALYZE`, runs the query and reports actual timings              |

## SSL/TLS

**Disabled** is the default and speaks plain HTTP. There is no plaintext fallback, so every other mode forces TLS.

| Mode                       | Certificate check                                                                   |
| -------------------------- | ----------------------------------------------------------------------------------- |
| **Preferred**              | None                                                                                |
| **Required (skip verify)** | None                                                                                |
| **Verify CA**              | Certificate chain. Point **CA Certificate** at your CA file for a private authority |
| **Verify Identity**        | Chain and hostname                                                                  |

## Limitations

* No primary keys, indexes, or foreign keys are reported. The Structure tab's Indexes view is always empty.
* Import is not available. Export works; see [Import and Export](/features/import-export).
* Kerberos and OAuth 2.0 authentication are not supported.
* The **Query timeout** in [settings](/customization/general-settings#query-timeout) does not reach Trino. A long query runs until you cancel it or the cluster ends it.
* Presto is not supported. It speaks the same protocol under an `X-Presto-` header prefix, and this driver always sends `X-Trino-`.

## Troubleshooting

### Cannot reach the coordinator

Confirm the host and that the coordinator port is open. Trino serves HTTP on `8080` and HTTPS on `8443` by default.

### Authentication failed

Password and JWT auth need TLS. Set an SSL mode, then confirm the credentials.

### NOT\_SUPPORTED

The catalog's connector does not implement that operation, whatever Trino's grammar allows. Check the connector's own documentation for what it supports.
