Trino is the rebranding of PrestoSQL. QuerySurge can take advantage of the power and connectivity options of Trino by setting up a regular JDBC connection to your Trino. For the setup below, we'll assume that your Trino instance is already set up and available. To download the Trino JDBC driver, and for instructions about the Trino JDBC setup, see this Trino article.
Create a Connection
To create a Trino connection in QuerySurge, we use the Connection Extensibility feature of the Connection Wizard. Key pieces of information that you'll need for your connection include:
- The Trino JDBC driver class:
- Your Trino server name or IP
- Your Trino port
- The Trino JDBC Connection URL (using the server id and port):
Note that catalog and schema are optional.
Note: Trino always requires a username on a connection, even if there is no authentication required for your Trino instance. The name can be any valid string of characters. If there is no authentication required for your Trino, a password should not be entered, only a username.
Setting up a Connection with the Trino JDBC Driver
- Download the Trino JDBC driver. The driver download can be found here.
- Deploy the driver jar to your QuerySurge Agent(s). The procedure for deploying a driver to a QuerySurge Agent is here (for Agents on Windows) and here (for Agents on Linux).
- Log into QuerySurge as a QuerySurge Admin user, and navigate to the Admin view. Launch the Connection Wizard, give your Connection a name, and for the Data Source, choose the Connection Extensibility option. (Steps for using the Connection Extensibility feature can be found here.). Click Next.
- Enter the Trino driver class (io.trino.jdbc.TrinoDriver). Click Next.
- Enter your Trino JDBC URL (see above). Click Next. When you've entered your URL, the Connection Wizard will look like the following. After checking your entries, click Next.
Note: As noted, a username must be entered. The dots in the Password field are there by default; they can be ignored.
Note: A test query (optional) need only return a single row/column. For Trino Connections, both schema and table should be included in the query.
- If you have entered a test Query, you can use it to verify that your Connection parameters are correct by clicking the Test Connection button:
- The Connection test gives a popup showing whether the Connection was successfully completed:
- Once you have verified your Connection information, click the Save button to save the Connection. You are now ready to use the Connection in a QueryPair. Trino SQL language options are described here.