Trino
If you are using Trino for distributed SQL query processing and wish to use it to connect to SQreamDB, follow these instructions.
Before You Begin
It is essential you have the following installed:
SQreamDB version 4.1 or later
Trino version 403 or later
JDBC version 4.5.6 or later
Installation
The Trino Connector must be installed on each cluster node dedicated to Trino.
Create a dedicated directory for the Trino Connector.
Download the Trino Connector and extract the content of the ZIP file to the dedicated directory.
Connecting to SQreamDB
Trino uses catalogs for referencing stored objects such as tables, databases, and functions. Each Trino catalog may be configured with access to a single SQreamDB database. If you wish Trino to have access to more than one SQreamDB database or server, you must create additional catalogs.
Catalogs may be created using properties
files. Start by creating a sqream.properties
file and placing it under trino-server/etc/catalog
.
The following is an example of a properties file:
connector.name=<name>
connection-url=jdbc:Sqream://<host and port>/<database name>;[<optional parameters>; ...]
connection-user=<user>
connection-password=<password>
Supported Data Types and Mapping
Use the appropriate Trino data type for executing queries. Upon execution, incompatible data types will be converted by Trino to SQreamDB data types.
Trino type |
SQreamDB type |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Examples
The following is an example of the SHOW SCHEMAS FROM
statement:
SHOW SCHEMAS FROM sqream;
The following is an example of the SHOW TABLES FROM
statement:
SHOW TABLES FROM sqream.public;
The following is an example of the DESCRIBE sqream.public.t
statement:
DESCRIBE sqream.public.t;
Limitations
The Trino Connector does not support the following SQL statements:
GRANT
REVOKE
SHOW GRANTSHOW ROLES
SHOW ROLE GRANTS