Preview of a new ADBC driver for Presto¶
An alpha release of a new ADBC driver for Presto is now available via dbc . Run dbc install --pre presto to try version 0.1.0-alpha.1 today.
The driver supports query execution, bind parameters, bulk ingestion (create, append, create-or-append, and replace modes), catalog metadata retrieval, table schema discovery, and prepared statements. Documentation can be found at adbc-drivers.org. This is a preview release, and more features are actively being developed, so stay tuned.
The driver was developed by the ADBC Driver Foundry, is implemented in Go, and is built on the Presto Go client . It supports HTTP and HTTPS connections, including custom CA certificates and mutual TLS, and passes unrecognized connection parameters to Presto as session properties.
To get started, provide a connection URI with a presto:// scheme:
presto://user:password@host:8080/catalog/schema
The driver can then be used like any other driver. For example, load it in Python with adbc-driver-manager:
from adbc_driver_manager import dbapi
with (
dbapi.connect(
driver="presto",
db_kwargs={"uri": "presto://user@localhost:8080/tpch/tiny"},
autocommit=True,
) as con,
con.cursor() as cursor,
):
cursor.execute("SELECT * FROM nation")
table = cursor.fetch_arrow_table()
Bug reports and feature requests are welcome through GitHub Issues in the presto repository in the ADBC Driver Foundry. You can also start a Discussion on GitHub or join the Columnar Community Slack .