New in Looker 7.10, Looker can use connection pools on Amazon Redshift to improve query performance.
You can access data from Amazon Redshift, optionally also using Amazon Redshift Spectrum to access data stored in S3.
Encrypting Network Traffic
Looker strongly recommends encrypting network traffic between the Looker application and your database. Consider one of the options described on the Enabling secure database access documentation page.
If you’re interested in using SSL encryption, see the Amazon Redshift documentation.
Users and Security
First, create your Looker user.
some_password_here to a unique, secure password:
CREATE USER looker WITH PASSWORD 'some_password_here';
(taken from the Redshift ALTER USER documentation)
- 8 to 64 characters in length.
- Must contain at least one uppercase letter, one lowercase letter, and one number.
- Can use any printable ASCII characters (ASCII code 33 to 126) except
@, or space.
Next, grant the appropriate privileges:
GRANT USAGE ON SCHEMA public TO looker; GRANT SELECT ON TABLE public.table1 TO looker; GRANT SELECT ON TABLE public.table2 TO looker; ... GRANT SELECT ON TABLE public.tableN TO looker;
To give Looker access to the information schema data it needs for the LookML Generator and the SQL Runner side bar, run:
GRANT SELECT ON TABLE information_schema.tables TO looker; GRANT SELECT ON TABLE information_schema.columns TO looker;
If you wish to
GRANT SELECT on all of your tables to the
looker user, execute this query:
GRANT SELECT ON ALL TABLES IN SCHEMA public TO looker;
For acceptable Redshift performance, it is necessary to set the proper distribution and sort keys. See the Redshift documentation for details.
Temp Schema Setup
While logged in to your Redshift database as an admin user, run:
CREATE SCHEMA looker_scratch AUTHORIZATION looker;
looker_scratch schema is already created or has bad permissions:
ALTER SCHEMA looker_scratch OWNER TO looker;
Setting the search_path
Finally, you should set an appropriate
search_path, which Looker’s SQL Runner uses to retrieve certain metadata from your database. Assuming you have created a user called
looker, and a temp schema called
looker_scratch, the command is:
ALTER USER looker SET search_path TO '$user',looker_scratch,schema_of_interest,public; ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ include a comma-separated list of all schemas you'll use with Looker
Optionally Accessing Data in S3 Using Amazon Redshift Spectrum
You can take full advantage of Amazon Redshift Spectrum’s amazing performance from within Looker.
Spectrum significantly extends the functionality and ease of use for Redshift by letting users access data stored in S3, without having to load it into Redshift first. You can even join S3 data to data stored in Redshift, and the Redshift optimizer will take care of maximizing your query performance, optimizing both the S3 and Redshift portions of your query. For information on setting up access using Amazon Spectrum, see this Community topic.
For Looker to support some features, your database dialect must also support them.
In Looker 21.6, Amazon Redshift supports the following Looker features:
After completing the database configuration, you can connect to the database from Looker using these directions.