General Steps for Creating a Connection
The exact steps you need to take depend on the database dialect you are using and the other choices you make. This page serves as an outline of the steps you need to take for creating a connection, with links to the details you need. You can also see this information by watching this video.
The steps are:
From your database administrator, get the contact details for your database such as host name, database or schema name, username, and password.
Enable secure access to your database. You have several choices:
On your database, set it up to work with Looker. The instructions vary quite a bit from dialect to dialect. Typically the steps include adding permissions for Looker to access the database and possibly creating a scratch schema for Looker to create derived tables in the database. To see the instructions you need, go to the Database Configuration page and click on your database dialect.
In Looker, go to the Admin panel’s Connection page. If you are in a trial, typically you won’t have any connections on that page.
Click New Database Connection to start setting up the connection to the database. You can see explanations for each field on the New Connection page in the Adding Connections section of the Connections documentation page. In general, you specify:
- The name you want to use to refer to the connection
- The database dialect
- The connection information for reaching your database
- Various options, including whether you’ll let Looker write derived tables to the database and how you want the connection to behave
- What timezone the database data is stored in
- Additional JDBC connection string parameters, if needed by your database
At the bottom of the New Connections page, click Test These Settings to verify the settings for Looker to reach the database. If any of the tests do not pass, try some of the troubleshooting steps on the Testing Database Connectivity documentation page. If you are still having trouble, doublecheck the database details with your database administrator, then contact your Looker Analyst or the Looker chat team for assistance.
When the testing is successful, click Add Connection. The connection now appears on the Admin panel’s Connection page. If you are in a trial, this will be your first connection on that page.
Next, it is a good practice to doublecheck that your connection is working properly. In Looker, use the Develop menu to go to the SQL Runner, which lets you use a connection to do a variety of tasks such as directly typing and running SQL queries.
In SQL Runner, select the name of the connection we created and the database or schema that we specified for the connection. Then check that the expected tables are listed. Clicking a table will show the columns in that table, verifying that Looker was able to use the connection to access your database tables.
You have now set up the database connection and verified that Looker can reach the database.
If you are in a trial, your Looker Analyst typically will have performed the other project setup steps for you. If you have time before your trial kickoff meeting, consider reading through the Development Process tutorials, which begin with the LookML Projects and Developer Mode page, or request a login to the learn.looker.com instance and walk through the tutorials there.
If you are not in a trial, the next steps for creating a new project are:
- Creating a project to hold our data model
- Configuring the project to accept our connection
- Setting up version control to manage changes to the data model