Trino Driver v0.8.0

Driver Version v0.8.0 Release Date 2026-11-10 Tested With Trino 484

This driver provides access to Trino , a free and open-source distributed SQL query engine.

Installation

The Trino driver can be installed with dbc :

dbc install trino

Connecting

To use the driver, provide a Trino connection string as the uri option. The driver supports URI format and DSN-style connection strings, but URIs are recommended.

from adbc_driver_manager import dbapi

dbapi.connect(
    driver="trino",
    db_kwargs={"uri": "http://user@localhost:8080?catalog=tcph&schema=tiny"},
)

Note: The example above is for Python using the adbc-driver-manager package but the process will be similar for other driver managers. See adbc-quickstarts .

Connection String Format

trino://[user[:password]@]host[:port][/catalog[/schema]][?attribute1=value1&attribute2=value2...]

Components:

  • Scheme: trino:// (required)

  • user: Optional (for authentication)

  • password: Optional (for authentication, requires user)

  • host: Required (no default)

  • port: Optional (defaults to 8080 for HTTP, 8443 for HTTPS)

  • catalog: Optional (Trino catalog name)

  • schema: Optional (schema within catalog)

  • Query params: Trino connection attributes

Note

Reserved characters in URI elements must be URI-encoded. For example, @ becomes %40. If you include a zone ID in an IPv6 address, the % character used as the separator must be replaced with %25.

HTTPS/SSL Configuration

HTTP Basic authentication is only supported on encrypted connections over HTTPS.

By default, connections use HTTPS. To connect using HTTP, add SSL=false as a query parameter:

  • trino://localhost:8080/catalog?SSL=false → Uses HTTP on port 8080

  • trino://localhost/catalog?SSL=false → Uses HTTP on default port 8080

  • trino://localhost:8443/catalog?SSL=true → Uses HTTPS on port 8443

  • trino://localhost:8080/catalog → Uses HTTPS on port 8080

  • trino://localhost/catalog → Uses HTTPS on default port 8443

SSL Certificate Verification:

To trust a private CA, provide its certificate using SSLCertPath or SSLCert.

Use SSLVerification=NONE to disable certificate verification while maintaining an encrypted HTTPS connection:

  • trino://localhost:8443/catalog?SSLVerification=NONE → Uses HTTPS with certificate verification disabled

Client Certificate Authentication:

For mutual TLS, use HTTPS and provide the client certificate using SSLClientCertPath or SSLClientCert, and its private key using SSLClientKeyPath or SSLClientKey.

See Trino JDBC Documentation for complete parameter reference and Trino Concepts for more information.

Examples:

  • trino://localhost:8080/hive/default

  • trino://user:pass@trino.example.com:8080/postgresql/public

  • trino://trino.example.com/hive/sales?SSL=true

  • trino://user@localhost:8443/memory/default?SSL=true&source=myapp

  • trino://user@localhost:8443/hive/default?SSLVerification=NONE (for self-signed certificates)

  • trino://user@localhost:8080/memory/default?session_properties=task_concurrency:2;query_priority:1

The driver also supports the Trino DSN format (see Go Trino Client documentation ), but URIs are recommended.

Feature & Type Support

Feature Trino
Bind Parameters ✅
Bulk Ingestion Create ✅
Append ✅
Create/Append ✅
Replace ✅
Temporary Table ❌
Target Catalog ✅
Target Schema ✅
Non-nullable fields are marked NOT NULL ❌
Catalog (GetObjects) depth=catalogs ✅
depth=db_schemas ✅
depth=tables ✅
depth=columns (all) ✅
Get Parameter Schema ❌
Get Table Schema ✅
Prepared Statements ✅
Transactions ✅

Types

Database to Arrow

Database Type Trino

ARRAY

list

BIGINT

int64

BOOLEAN

bool

DATE

date32[day]

DECIMAL

decimal64

DOUBLE PRECISION

double

INT

int32

INTERVAL DAY TO SECOND

month_day_nano_interval

INTERVAL YEAR TO MONTH

month_day_nano_interval

IPADDRESS

string

REAL

float

SMALLINT

int16

TIME

time64[us]

TIMESTAMP

timestamp[us]

TIMESTAMP WITH TIME ZONE

timestamp[us] (with time zone)

TIMESTAMP(0)

timestamp[s]

TIMESTAMP(0) WITH TIME ZONE

timestamp[s] (with time zone)

TIMESTAMP(p) (1 <= p <= 3)

timestamp[ms]

TIMESTAMP(p) (1 <= p <= 3) WITH TIME ZONE

timestamp[ms] (with time zone)

TIMESTAMP(p) (4 <= p <= 6)

timestamp[us]

TIMESTAMP(p) (4 <= p <= 6) WITH TIME ZONE

timestamp[us] (with time zone)

TIMESTAMP(p) (7 <= p <= 9)

timestamp[ns]

TIMESTAMP(p) (7 <= p <= 9) WITH TIME ZONE

timestamp[ns] (with time zone)

UUID

extension<arrow.uuid>

VARBINARY

binary

VARCHAR

string

Arrow to Database

Arrow Type Trino Type
Bind Ingest

binary

VARBINARY

binary_view

VARBINARY

bool

BOOLEAN

date32[day]

DATE

decimal128

DECIMAL

DECIMAL, NUMERIC ⚠️ [1]

decimal32

(NA/not tested)

DECIMAL

decimal64

(NA/not tested)

DECIMAL

double

DOUBLE PRECISION

extension<arrow.uuid>

UUID

fixed_size_binary

VARBINARY

float

REAL

halffloat

REAL

(NA/not tested)

int16

SMALLINT

int32

INT

int64

BIGINT

large_binary

VARBINARY

large_string

VARCHAR

string

IPADDRESS, VARCHAR

VARCHAR

string_view

VARCHAR

time32[ms]

TIME

time32[s]

TIME

time64[ns]

TIME

time64[us]

TIME

timestamp[ms]

TIMESTAMP(3)

timestamp[ms] (with time zone)

TIMESTAMP(3) WITH TIME ZONE

timestamp[ns]

TIMESTAMP(9)

timestamp[ns] (with time zone)

TIMESTAMP(9) WITH TIME ZONE

timestamp[s]

TIMESTAMP(0)

timestamp[s] (with time zone)

TIMESTAMP(0) WITH TIME ZONE

timestamp[us]

TIMESTAMP(6)

timestamp[us] (with time zone)

TIMESTAMP(6) WITH TIME ZONE

Year/month and day/time intervals, including parameterized interval types, are returned as Arrow month-day-nanosecond intervals. Fractional seconds beyond nine digits are truncated to nanoseconds.

Options

trino.session_user, trino.impersonation_user

Type: string.

Impersonate a different user (run queries as that user) while logging in as the specified user. If both options are provided, it is not specified which one will be followed.

trino.http_header.<Name>

Type: string.

Send the HTTP header <Name> with the given value to the Trino server, for example to route queries through a gateway or proxy. Headers that the driver or the HTTP client manage (Authorization, Accept-Encoding, X-Trino-User, X-Trino-Catalog, X-Trino-Schema, X-Trino-Session, X-Trino-Role, X-Trino-Transaction-Id, X-Trino-Prepared-Statement, hop-by-hop headers, and similar) cannot be set.

  • On the database, the header is sent on every request, and overrides one with the same name that the driver sets from the URI (e.g. X-Trino-Client-Tags from clientTags). An empty value is ignored.

  • On a statement, the header is sent on every request of the queries run by this statement (submitting them, fetching their results, and cancelling them), and overrides one with the same name set by the driver or on the database. It applies to every execution of the statement (including AdbcStatementExecuteSchema and bulk ingestion) until it is changed; changing it does not affect a query that is already running. Set an empty string to remove the header.

For example, set trino.http_header.X-Trino-Client-Tags on a statement to replace the connection’s client tags (from clientTags in the URI) for this statement’s queries, e.g. to select a resource group .

trino.statement.last_query_id

Read-only. Type: string.

Get the query ID of the currently executing or last executed query. This can safely be retrieved concurrently. Note that in some cases, a single query on the ADBC side may result in multiple queries on the Trino side (e.g. a bulk ingest will result in one query for each batch of rows), and so there may not be a canonical query ID as such; this option will retrieve the ID of the last query that happened to execute.

Compatibility

This driver was tested on:

  • Trino Trino 484

Previous Versions

To see documentation for previous versions of this driver, see the following: