Looker is a contemporary business intelligence (BI) platform that offers an innovative way to access, analyze, and visualize data. This article aims to provide a detailed, technical guide on setting up a Looker environment, establishing a database connection, and initializing your first Looker project.
Setting Up the Looker Environment
A Looker environment is cloud-based and communicates with the SQL database through a direct connection. It supports an array of SQL dialects, including MySQL, PostgreSQL, Google BigQuery, Amazon Redshift, and Snowflake, to mention a few. The following steps guide you through the setup process:
-
Create a Looker Account: Navigate to the Looker website and sign up for an account. Note that Looker is typically a paid product, with occasional trial periods offered. In general, purchasing a license is required.
-
Looker Instance: After account creation, Looker assigns a cloud-hosted instance dedicated to your use. This instance's URL follows the
yourcompany.looker.comformat. -
Admin Panel: Log into the Looker instance and find the Admin panel. This section lets users manage the Looker environment, including LookML projects, database connections, roles, and users.
Connecting to the Database
After setting up the Looker environment, the next step involves connecting Looker to your SQL database.
In the Admin panel, select the "Connections" tab and click "New Connection". Fill in the necessary details:
- Name: The connection name used to reference this connection in your LookML model.
- Dialect: The SQL dialect of your database.
- Host: The hostname or IP address of your database server.
- Port: The listening port for your database server.
- Database: The name of your database.
- Username and Password: Credentials for Looker to connect to your database.
- Persistent Derived Tables (PDT) Schema: (Optional) Schema name for Looker to create persistent derived tables, required if using PDTs.
- Temp Database: (Optional) The name of the database where Looker should create temporary tables.
Example:
Name: ecommerce_db
Dialect: PostgreSQL
Host: db.ecommerce.com
Port: 5432
Database: ecommerce
Username: looker
Password: [Your_Password]
PDT Schema: looker_pdt
Temp Database: looker_temp
After filling out these details, select "Test These Settings" to verify Looker's ability to connect to your database. If the test is successful, click "Add Connection".
Creating a LookML Project
With a stable database connection, you can create a LookML project. In the "Develop" menu, choose "Manage LookML Projects", then click "New LookML Project". Fill in the necessary details:
- Project Name: A unique name for the project.
- Starting Point: Choose between a "Blank Project" or "Generators" for auto-generating LookML from your database schema.
- Connection: Choose the database connection created earlier.
- Project Git Repository: Looker utilizes Git for version control. Users can use the built-in Git integration or connect to an external repository.
Upon creating the project, Looker generates a default set of LookML files. Users can start developing the LookML model by editing these files.
Summary
Establishing a Looker environment involves several steps: creating a Looker account, setting up a Looker instance, connecting Looker to your SQL database, and creating a LookML project. Even though these steps seem complex, the user-friendly interface of Looker coupled with its extensive documentation streamline the process. The subsequent articles will delve deeper into the technicalities of developing in LookML, data exploration, and visualization creation.