These pages discuss how to connect Looker to PrestoDB or Trino.
Configuring a connection
In the Admin section of Looker, select Connections, and then select New Connection.
Fill out the connection details. The majority of these settings are common to most database dialects. They are described on the Connecting Looker to your database documentation page. The following settings are specific to PrestoDB or Trino:
Dialect: Select PrestoDB or Trino.
PrestoSQL has been rebranded as Trino. If you use a Trino version earlier than 352, select PrestoSQL from Looker’s dialect menu.
- Host:Port: The database hostname and port. The default port is 8080.
- Database: The “catalog” or “connector,” in Presto terms.
Username: The username of the user who will run queries.
This information is sent to the PrestoDB or Trino server only if SSL is enabled.
Password: Password for the user who will run queries.
This information is sent to the PrestoDB or Trino server only if SSL is enabled.
Schema: The default schema to use when no schema is specified.
- Persistent Derived Tables: Check this box to enable persistent derived tables. This reveals additional PDT fields and the PDT Overrides column.
- Temp Database: The schema to write PDTs. (Version 3.50 added PDT support to Presto. See the Configuring PrestoDB or Trino for PDTs section on this page for more information about how to configure Presto for PDT support.)
- Additional Params: Any additional parameters from the PrestoDB JDBC driver or Trino JDBC driver.
- SSL: Check to enable SSL connections.
- Verify SSL: Ignore this field. All SSL connections will use the default Java Truststore unless directed to do otherwise with PrestoDB JDBC parameters or Trino JDBC driver, which you can enter in the Additional Params field.
Click Test These Settings to verify a connection. Looker will run a SELECT 1
query to verify a basic connection and perform a query test. It will not validate that the catalog and schema combination exists or that the user has access to it.
Click Update Connection to save these settings.
For more information about connection settings, see the Connecting Looker to your database documentation page.
Configuring PrestoDB or Trino for PDTs
PDT support depends on the connector you are using with PrestoDB or Trino. This section explains the necessary configuration settings for a scratch database. This example assumes the connector you are using is hive
.
There are a few configuration properties and values that the Hive catalog properties file should contain.
The following is required because Presto caches the Hive metastore results, and Looker needs to be able to see the tables right away:
hive.metastore-cache-ttl = 0s
These two properties are required because Looker needs to be able to drop and rename PDTs:
For reference, in our internal Presto testing servers we use the following hive.properties
file, which is used for all Hive schemas:
Reference
For more information about configuring your Hive connector, see PrestoDB Hive Connector or Trino Hive Connector.
Feature support
For Looker to support some features, your database dialect must also support them.
In Looker 22.6, PrestoDB supports the following Looker features:
In Looker 22.6, Trino supports the following Looker features:
Next steps
After you have connected your database to Looker, configure sign-in options for your users.