Trino ADB connector overview
Connecting to an ADB cluster through the Trino connector begins with creating a new Trino catalog.
The catalog configuration must use the adb
connector type and must contain the following set of properties (at minimum):
connector.name=adb (1)
connection-url=jdbc:postgresql://<adb_master>:5432/database (2)
connection-user=<adb_username> (3)
connection-password=<password>
1 | Sets the connector type to work with ADB. |
2 | Sets the JDBC connection string to connect to the ADB server. The connector uses the PostgreSQL JDBC driver and supports all its configuration properties as well as inherits its limitations. For more information, see Trino PostgreSQL connector. |
3 | Specifies the ADB user to connect to ADB. The user must be pre-created on the ADB side and must have sufficient permissions to perform operations in the ADB cluster. |
For more details about the ADB catalog configuration, see ADB catalog parameters and the usage example.
Connector operating modes
The Trino connector can interact with an ADB cluster in two modes:
-
Both read/write operations are performed via gpfdist.
gpfdist
is a file distribution utility that allows loading and unloading data in parallel from external ADB tables. Under the hood, the Trino connector spins upgpfdist
servers on ADH hosts, and ADB segments usegpfdist
clients to exchange data with the Trino connector in parallel. -
Write data to ADB via gpfdist, read data using gp_parallel_retrieve_cursor.
The
gp_parallel_retrieve_cursor
module is an enhanced cursor implementation that allows fetching query results in parallel directly from ADB segments. This cursor type provides faster parallel reads, adds extra flexibility by fetching data in chunks, and generally is more efficient for retrieving large result sets.
Enable parallel retrieve cursor mode
To enable fetching data from ADB with gp_parallel_retrieve_cursor
, do the following:
-
In the ADB cluster, create the
gp_parallel_retrieve_cursor
extension:CREATE EXTENSION gp_parallel_retrieve_cursor;
-
When creating a new Trino catalog for ADB, set the
adb.connector.gp-parallel-cursor.enabled=true
property.