A LookML project is a collection of LookML files that describe how to access and model data for BI and data visualization.
Think of LookML as a collection of recipe instructions for turning raw data into insightful dishes. Instead of ingredients and steps, you define the data’s components (such as customer names, product types, and sales numbers) and how to combine them (think filtering, grouping, and calculating). Looker, your helpful kitchen assistant, reads these instructions and provides the data ready to be used by anyone, no matter their data-cooking skills.
LookML files are written in a declarative language that defines the dimensions, measures, calculations, and relationships between tables in a database. Looker uses LookML to generate SQL queries that retrieve data from the database and present it in a user-friendly interface. The key components of a LookML project are model files, view files, Explores, dimensions and measures. LookML projects are a powerful way to create a single source of truth for your data.
Getting ready
Before creating your first LookML project, make sure Development Mode is activated (Figure 1.21). To do this, in the left navigation panel, toggle the Development Mode switch on.
Figure 1.21 – Development Mode toggle
You can exit Development Mode by clicking on Exit Development Mode in the top-right corner.
In the next chapters, we will work with Development Mode activated.
How to do it...
The steps for this recipe are as follows:
- Exit from the Admin navigation tab and make sure you see the Explore, Develop, and Admin tabs on the left.
- Click on Develop, then click on Projects (Figure 1.22).
Figure 1.22 – Projects
- When you’re on the Projects page, click on New LookML project.
- On the project creation page, give your project a name (
test_project
in our case), choose the database/data warehouse connection you created previously (bq_connection1
), keep the other fields as they are, and click on Create Project (Figure 1.23).
Figure 1.23 – New Project
- In some cases, you might want to create multiple LookML projects. For example, LookML projects can have multiple model files, but if you want to set different permissions for users to view and edit LookML for specific model files, you can create separate projects for each model.
How it works...
When creating your LookML project, you have three starting points available:
The Generate Model from DB Schema option is the one we used in this chapter; it gives Looker the possibility to automatically detect tables and table columns and build a basic model that you can edit if you need to. It is an option that is used quite often.
For some specific cases, you might want to create a blank project to start everything from scratch. To do this, select Blank Project.
When you choose Clone Public Git Repository, you can get some LookML models, views, and other files configured and ready to use from the existing Git repository.
In this chapter, we chose the first option. But even this option eventually needs a Git connection so you can work on your LookML projects with your colleagues and/or partners and have certain version control in case there are any changes made.
When you create your first project, you will see the LookML development page with an automatically created model and view (or views, depending on whether you have one or multiple tables) – see Figure 1.24.
Figure 1.24 – LookML model and view
See also