Connecting to Trino
Prerequisites
- The Trino instance is accessible over the network from the PuppyGraph instance.
Configuration
| Configuration | Explanation |
|---|---|
| Username | The username of the Trino instance |
| Password | The password of the Trino instance (if authentication is enabled) |
| JDBC Connection String | A JDBC compatible connection URL of the data source. Read this page for more details on how to construct the JDBC URL. |
| JDBC Driver Class | The class name of the JDBC Driver. The default value is |
| JDBC Driver URL | The URL of the Trino JDBC Driver. By default, PuppyGraph bundles the Trino JDBC driver JAR (for example, |
Data Type Mapping
| Trino Type | PuppyGraph Type | Description |
|---|---|---|
BOOLEAN |
Boolean |
True or false |
TINYINT, SMALLINT |
Short |
16-bit signed integer |
INTEGER |
Int |
32-bit signed integer |
BIGINT |
Long |
64-bit signed integer |
DOUBLE |
Double |
64-bit IEEE 754 floating point |
DECIMAL(P, S) |
Decimal(38, 9) |
Fixed-point decimal, always read as precision 38, scale 9 |
CHAR, VARCHAR |
String |
Character strings |
JSON |
String |
JSON document as text |
DATE |
Date |
Calendar date without time or timezone |
TIMESTAMP |
DateTime |
Date and time |
- Every
DECIMALcolumn is read asDecimal(38, 9)whatever its declared precision and scale, so digits beyond the ninth after the decimal point are lost.Decimal(38, 9)also leaves room for only 29 digits before the decimal point, so larger values cannot be represented. REALcolumns are listed asDouble, but queries that read them fail, because the driver returns 32-bit values. Do not add them to a node or edge as attributes.- Columns of any other type, such as
TIME,TIMESTAMP WITH TIME ZONE,VARBINARY,UUID,IPADDRESS,INTERVAL,ARRAY,MAPorROW, are not supported. They are listed in Schema Builder, but you cannot add them to a node or edge as attributes.
If you need a data type that is not supported, or one that is not listed here, contact us.
Demo
See Querying Trino Data as a Graph for a complete demo for Trino. The demo includes setting up the connection to a Trino instance.