Looker

We will describe two approaches to rolling out the Alvin query optimizer:

  • Full rollout: A full roll-out can be done in the Looker connection setup, by setting the rootUrl jdbc parameter. See below for more details on this. This means that all users in the Looker instance would immediately have their queries passed through and optimized by the Query Optimizer.

  • Gradual rollout to users/groups: Here the proxy can be enabled on an individual user/group basis, allowing you to quickly validate the performance and results of the proxy before rolling out to the entire company.

Full rollout

  1. Go to Admin > Connection in your Looker environment and edit your connection at https://<your-looker-instance>/admin/next/connections/<connection-id>/edit Set the Additional JDCB Parameters field like this: rootUrl=https://<your-org>.opti.alvin.ai You can find your proxy URL here or by asking an Alvin representative. Make sure that the URL has the https protocol.

  2. After making this change, you will need to reauthenticate the connection. Go to Database Settings and upload your Service Account Certificate or add your OAuth credentials. Test the connection is working and then hit save.

Gradual rollout to users/groups

As outlined in the Looker documentation, it is possible to have a user attribute defining properties and parameters of a connection, and this is exactly what we will do with the rootUrl parameter as above. As we can see in the below screenshots, the connection’s jdbc parameters is set up using liquid templating syntax instead of being hard coded. Follow the instructions below to set it up:

  1. Go to https://<your-looker-instance>.cloud.looker.com/admin/user_attributes and create a new user attribute named alv_proxy_url with the settings below. The default value of this attribute should be https://bigquery.googleapis.com Now hit save.

  2. Once saved, you will see two new tabs 'Group Values' and 'User Values'. Select a user or group with which you want to test the proxy and set a new value to your proxy url in the format https://<your-org>.opti.alvin.ai . You can find your proxy URL here or by asking an Alvin representative. Make sure that the URL has the https protocol. For more insight in how to set up users and groups, check out the official Looker documentation. Once set it will look like the screenshot below.

  1. Go to the Admin > Connection and edit your connection at https://<your-looker-instance>/admin/next/connections/<connection-id>/edit Set the Additional JDCB Parameters field like this: rootUrl={{ _user_attributes['alv_proxy_url'] }} This connection will now use the user attribute alv_proxy_url you created in the previous step for the chosen user/group.

  1. After making this change, you will need to reauthenticate the connection. Go to Database Settings and upload your Service Account Certificate or add your OAuth credentials. Test the connection is working and then hit save.

  2. You're good to go! Once you've done some initial testing and are happy with the performance, you can then follow the full rollout as above.

Last updated