Presto¶
Driver Version v0.1.0-alpha.1 Release Date 2026-08-19 Tested With Presto 0.298
Warning
This is documentation for a prerelease version.
This driver provides access to Presto , a free and open-source distributed SQL query engine.
Installation¶
The Presto driver can be installed with dbc :
dbc install --pre presto
Connecting¶
To use the driver, provide a Presto connection string as the uri option.
from adbc_driver_manager import dbapi
dbapi.connect(
driver="presto",
db_kwargs={
"uri": "presto://user@localhost:8080/tpch/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¶
presto://[user[:password]@]host[:port][/catalog[/schema]][?attribute1=value1&attribute2=value2...]
Components:
Scheme:
presto://(also acceptshttp://andhttps://)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 (Presto catalog name)schema: Optional (schema within catalog)Query params: TLS attributes (see below); unrecognized parameters are passed to Presto as session properties
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¶
By default, connections use HTTP. HTTPS is used when the URI scheme is
https:// or when any of the following query parameters is present:
ssl_ca: Path to a PEM CA certificate used to verify the serverssl_certandssl_key: Paths to a PEM client certificate and key for mutual TLSssl_skip_verify=true: Disable server certificate verification while maintaining an encrypted HTTPS connection (for self-signed certificates; not recommended for production)
Examples:
presto://localhost:8080/hive/default→ HTTP on port 8080https://presto.example.com/hive/sales→ HTTPS on default port 8443, verified against the system trust storepresto://presto.example.com/hive/sales?ssl_ca=/path/to/ca.pem→ HTTPS with a custom CApresto://user@localhost:8443/hive/default?ssl_skip_verify=true→ HTTPS without certificate verification (self-signed certificates)presto://user@localhost:8080/memory/default?query_max_stage_count=100→ HTTP with a Presto session property
See Presto Concepts for more information on catalogs and schemas, and the Go Presto Client documentation for the underlying DSN reference.
Feature & Type Support¶
| Feature | Presto | |
|---|---|---|
| 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 | Presto |
|---|---|
|
ARRAY |
string |
|
BIGINT |
int64 ⚠️ [1] |
|
BOOLEAN |
bool |
|
DATE |
date32[day] |
|
DECIMAL |
string |
|
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 |
time32[ms] |
|
TIMESTAMP |
timestamp[ms] |
|
TIMESTAMP WITH TIME ZONE |
timestamp[ms] (with time zone) |
|
UUID |
extension<arrow.uuid> |
|
VARBINARY |
binary |
|
VARCHAR |
string |
Arrow to Database¶
| Arrow Type | Presto Type | |
|---|---|---|
| Bind | Ingest | |
|
binary |
VARBINARY |
|
|
binary_view |
VARBINARY |
|
|
bool |
BOOLEAN |
|
|
date32[day] |
DATE |
|
|
decimal128 |
DECIMAL |
DECIMAL, NUMERIC ⚠️ [2] |
|
double |
DOUBLE PRECISION |
|
|
extension<arrow.uuid> |
UUID |
|
|
fixed_size_binary |
VARBINARY |
|
|
float |
REAL |
|
|
halffloat |
REAL |
(NA/not tested) |
|
int16 |
SMALLINT |
|
|
int32 |
INT |
|
|
int64 |
BIGINT ⚠️ [1] |
|
|
large_binary |
VARBINARY |
|
|
large_string |
VARCHAR |
|
|
string |
IPADDRESS, VARCHAR |
VARCHAR |
|
string_view |
VARCHAR |
|
|
time32[ms] |
TIME |
|
|
timestamp[ms] |
TIMESTAMP(3) |
|
|
timestamp[ms] (with time zone) |
TIMESTAMP(3) WITH TIME ZONE |
|
|
timestamp[ns] |
(NA/not tested) |
TIMESTAMP(9) [3] |
|
timestamp[ns] (with time zone) |
(NA/not tested) |
TIMESTAMP(9) WITH TIME ZONE [3] |
|
timestamp[s] |
(NA/not tested) |
TIMESTAMP(0) |
|
timestamp[s] (with time zone) |
(NA/not tested) |
TIMESTAMP(0) WITH TIME ZONE |
|
timestamp[us] |
(NA/not tested) |
TIMESTAMP(6) [3] |
|
timestamp[us] (with time zone) |
(NA/not tested) |
TIMESTAMP(6) WITH TIME ZONE [3] |
Compatibility¶
This driver was tested on:
Presto
Presto 0.298.1-9e1b45f