Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Business Intelligence with Looker Cookbook

You're reading from   Business Intelligence with Looker Cookbook Create BI solutions and data applications to explore and share insights in real time

Arrow left icon
Product type Paperback
Published in May 2024
Publisher Packt
ISBN-13 9781800560956
Length 256 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Khrystyna Grynko Khrystyna Grynko
Author Profile Icon Khrystyna Grynko
Khrystyna Grynko
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Chapter 1: Getting Started with Looker FREE CHAPTER 2. Chapter 2: Configuring Views and Models in a LookML Project 3. Chapter 3: Working with Data in Explores 4. Chapter 4: Customizing and Serving Dashboards 5. Chapter 5: Making Dashboards Interactive through Dynamic Elements 6. Chapter 6: Troubleshooting Looker 7. Chapter 7: Integrating Looker with Other Applications 8. Chapter 8: Organizing the Looker Environment 9. Chapter 9: Administering and Monitoring Looker 10. Chapter 10: Preparing to Develop Looker Applications 11. Index 12. Other Books You May Enjoy

Building a LookML project

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

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:

  1. Exit from the Admin navigation tab and make sure you see the Explore, Develop, and Admin tabs on the left.
  2. Click on Develop, then click on Projects (Figure 1.22).
Figure 1.22 – Projects

Figure 1.22 – Projects

  1. When you’re on the Projects page, click on New LookML project.
  2. 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

Figure 1.23 – New Project

  1. 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

Figure 1.24 – LookML model and view

See also

You have been reading a chapter from
Business Intelligence with Looker Cookbook
Published in: May 2024
Publisher: Packt
ISBN-13: 9781800560956
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image