home User Guide Getting Started Help Center Documentation Community Training Certification
menu
close
settings
Looker keyboard_arrow_down
language keyboard_arrow_down
English
Français
Deutsch
日本語
search
print
PrestoDB and PrestoSQL

These pages discuss how to connect Looker to PrestoDB or PrestoSQL.

Configuring a Connection

In the Admin section of Looker, navigate to the Connections page and click New Connection. Looker displays this page:

The majority of these settings are common to most database dialects, and are described on the Connecting Looker to Your Database documentation page. The following settings are specific to PrestoDB or to the example Connections Settings page shown above:

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 PrestoSQL for PDTs

PDT support depends on the connector you are using with PrestoDB or PrestoSQL. 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:

hive.allow-rename-table=true hive.allow-drop-table=true

For reference, in our internal Presto testing servers we use the following hive.properties file, which is used for all Hive schemas:

hive.s3.connect-timeout=1m hive.s3.max-backoff-time=10m hive.s3.max-error-retries=50 hive.metastore-cache-ttl = 0s hive.metastore-refresh-interval = 5s hive.s3.max-connections=500 hive.s3.max-client-retries=50 connector.name=hive-hadoop2 hive.s3.socket-timeout=2m hive.s3.staging-directory=/mnt/tmp/ hive.s3.use-instance-credentials=true hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop/conf/hdfs-site.xml hive.parquet.use-column-names=true hive.allow-drop-table=true hive.metastore.uri=thrift://:9083 hive.storage-format=ORC hive.allow-rename-table=true

Reference

For more information about configuring your Hive connector, see PrestoDB Hive Connector or PrestoSQL Hive Connector.

Troubleshooting

If using EMR with a Hive 1.0.0 version, there is a bug in the permissions of /user/hive/warehouse that prevents ALTER TABLE...RENAME TO from working.

To fix it, change the ownership of that database’s directory to hive:hadoop from hadoop:hive, with something like:

hadoop dfs -chown hive:hadoop -R /user/hive/warehouse/scratch_db.db

See the Presto on EMR documentation for more detail.

Debugging

Feature Support

For Looker to support some features, your database dialect must also support them.

In Looker 21.0, PrestoDB supports the following Looker features:

In Looker 21.0, PrestoSQL supports the following Looker features:

Next Steps

After you have connected your database to Looker, you’re ready to configure sign-in options for your users.

Top