Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Business Intelligence with Looker Cookbook
Business Intelligence with Looker Cookbook

Business Intelligence with Looker Cookbook: Create BI solutions and data applications to explore and share insights in real time

eBook
$21.99 $31.99
Paperback
$39.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Business Intelligence with Looker Cookbook

Configuring Views and Models in a LookML Project

As discussed in the previous chapter, the key components of a LookML project are model files and view files. Views contain dimensions and measures that represent the columns in the tables. One view equals one table (or a virtual table known as a database or data warehouse view). In the views, you can define the fields (dimensions and measures) that are available to users from each table, specify the labels and descriptions for each field, set default values for filters and other parameters, define custom calculations for measures, filter, and sort the data.

LookML model files are the foundation of any Looker application. They define the data that users can access and explore. By carefully designing your LookML model files, you can make it easy for users to find the data they need and to get the insights they need to make informed decisions. In LookML models, you can create the Explores based on one or multiple tables (views).

When...

Technical requirements

The preparation work for this chapter consists of the following steps:

  1. In your BigQuery environment in the bigquery-public-data list, scroll to find thelook_ecommerce dataset (https://console.cloud.google.com/marketplace/product/bigquery-public-data/thelook-ecommerce) (Figure 2.1).
  2. Click on Copy in the top-right of the window above the dataset description (Figure 2.1).
Figure 2.1 – BigQuery dataset

Figure 2.1 – BigQuery dataset

  1. Click Create to create a new dataset that will ‘receive’ the copy of thelook_ecommerce dataset. Give your future dataset a name (it can be the exact same name - thelook_ecommerce, choose US multiregion, and create the dataset. You might be requested to activate the Data Transfer API.
  2. Once the dataset is copied to your newly created dataset, you will see it appear under your project name in the BigQuery Explorer (Figure 2.2).
Figure 2.2 – BigQuery tables

Figure 2.2 – BigQuery tables...

Creating dimensions in views

When you create your LookML project and choose Generate Model from Database Schema, Looker detects the views (tables) and the view fields (columns) automatically. It usually adds three parameters to every column: name (dimension:), data type (time, string, number, yes/no, tier, date, etc.), and SQL (by default, it references the table and the name of the column in this table); ${field_name} references a specific field within a LookML file. Sometimes, Looker adds a primary_key parameter, if it detects a field that can be potentially a primary key field; it is important for join operations (many to many, many to one, one to many, etc.). By default, Looker creates all the fields (columns) as dimensions (qualitative data) and adds some measures.

Our job is to enrich and complete this data by adding the parameters to our existing dimensions and measures, and by creating new dimensions and measures.

How do we know what is needed? It is something to do before...

Creating measures in views

Measures in Looker are aggregations of one or more dimensions (or unique attributes of the data) such as a count or average. They are used to calculate key performance indicators (KPIs) and help business users analyze data using different aggregated attributes. Three of the most common measure types are sum, average, and count. Measures represent the quantitative information in Looker.

By combining measures and dimensions, you can create visualizations and dashboards that help you understand both the quantitative and qualitative aspects of your business.

When you create your LookML project and choose Generate Model from Database Schema, Looker will automatically create Count measures for your tables (views). In Your LookML environment, go and check what are the measures that were created in your views. For example, the following measures in distribution_centers.view might not be relevant for your data exploration and might not make sense at all:

...

Describing data in LookML views

Everything you do in LookML is aimed at making your data clean, complete, well organized, and ready to be used. There are numerous ways to describe and organize your data in LookML. In this section, we will go through some of the parameters to do so.

Getting ready

Let’s continue working in order_items.view. Make sure you have it open in your LookML environment. When working with the How to do it... section, try all the provided parameters in your environment. Don’t forget to click Save Changes to see how it all looks in the Explore tab.

How to do it...

The different parameters you can use to organize your dimensions and measures in views (Figure 2.15) and make it clear and accessible are the following:

  • Comments: The comments in LookML start with #. The automatic comments are added by Looker when the views and model were created in your project in Database Schema. Review the comments and make some changes. Add your comment...

Working with filters in LookML views

There are two main types of filters in LookML:

  • Explore-level filters: These let you restrict the data that you are viewing to rows of interest. Any field in your Looker instance can become a filter.
  • Field-level filters: These filters are applied to a specific field in the view and can be used to restrict the data that is available for that field in all Explores that use the field.

In this section, we will concentrate on the filters used in the LookML views.

Getting ready

For the examples in this section, we will work with inventory_items.view in the LookML project environment.

How to do it...

The different filter-related parameters that can be used in the views are the following:

  • Can filter: The can_filter parameter lets you prohibit a dimension or measure from being used as a filter.
  • Skip drill filter: If skip_drill_filter is yes, this dimension will not be included in drill filters.
  • Filters: filters...

Joining tables in models

In this section, we will work on our model file. Every LookML project can contain multiple model files if needed. Model files define Explores and their relationships to other views. Models can be placed in the Models section of the Looker IDE. The model’s name is taken from the filename and must be unique across your instance.

Getting ready

In this section, we will work on our unique lb_thelook_ecommerce.model model file.

In your LookML project in the left panel, click on models and then click on lb_thelook_ecommerce.model. Our existing model contains multiple parameters and Explores. Explores can be declared (created) based on one view or multiple views joined.

How to do it...

  1. To create an Explore based on one view (for example, distrubution_centers.view), the syntax is simple:
    explore: distribution_centers {}
  2. In the preceding case, the Explore name equals the base view name. In a Looker Explore, the base view is the initial data...

Adding advanced model parameters

In the model file created in your LookML project, there are some standard parameters added, such as the following:

  • connection: This parameter defines the database/data warehouse connection to be used for this model.
  • include: This defines what view files can be used in this model to build the Explores. In our case, we include all the views.
  • datagroup: This assigns a caching policy for Explores. Datagroup can also be used to regenerate PDTs.
  • persist_with: To use the datagroup caching policy as the default for Explores in a model, you can use the persist_with parameter at the model level, and specify the datagroup name.

In this section, we’ll review some advanced Model parameters and what they are used for.

How to do it…

Let’s add a few advanced Model parameters to our model:

  1. label: The label parameter changes the way that this model will appear in the Explore menu. Unless specified, the label...

Working with LookML files

Your LookML project can contain multiple different files. We already worked with view and model files, and we could see what the folders are for (models and views folders). You can create a new folder or file by pressing + (Figure 2.19).

Figure 2.19 – LookML files

Figure 2.19 – LookML files

Let’s add some more elements to enrich our LookML project.

Getting ready

Make sure you are in your LookML project environment with Development Mode activated (see the blue bar at the top of your Looker web page).

How to do it...

Let’s add some information about our LookML project:

  1. Click on the README.md file – in there, you will see some explanations about Looker; keep it as it is.
  2. Let’s add another document file to add some information about our e-commerce project – click the + sign near File Browser and click on Create Document.
  3. Name the document AboutThisProject and click Create.
  4. Click Edit...

Working with geodata in LookML

Geodata in your tables gives you the possibility to create map chart visualizations. In this section, we will have the opportunity to use the things we previously learned in combination with some new elements related to geodata.

Getting ready

You will need to download the following file to your computer, then drag and drop this file in your LookML environment (as shown in the previous section): communes.topojson - https://github.com/PacktPublishing/Business-Intelligence-with-Looker-Cookbook/blob/main/communes.topojson. This file contains the coordinates of the French communes – cities, towns, villages – local administrative units.

To visualize the geodata in a map chart, you need to include at least one of the following fields in your query: a dimension based on latitude and longitude data, a dimension with a map layer assigned to it, or a ZIP code dimension.

Note

According to the documentation, a ZIP code dimension automatically...

Reusing the LookML code

There are multiple ways to reuse the elements in LookML, such as the following:

  • include
  • extends
  • ${}
  • Refinements
  • Looker Blocks

We’ve already used $ quite a lot to reference the existing dimensions and measures.

We have also used the include parameter, which specifies the LookML files that will be available to a model, a view, and an Explore. If you want to use or reference a LookML file within another file, you must add it with the include parameter.

Let’s review some other techniques you can use to reuse elements in Looker.

Getting ready

Make sure you are in your LookML environment, and Development Mode is activated.

How to do it...

The extends parameters can be used both for views and Explores. For example, you can use the extends parameter in views to reuse the content and settings of another view, with the ability to override any settings that you want.

We can learn how to do that by following...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Explore data visualization, analysis, and reporting with Looker to gain insights from your data
  • Connect to data sources, build dashboards, and create reports to track and share key metrics
  • Share insights with your team to make better business decisions
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

Looker is a data analytics and business intelligence platform that allows organizations to explore, analyze, and visualize their data. It provides tools for data modeling, exploration, and visualization, enabling you to gain insights from your data to make informed business decisions. You’ll start with the basics, from setting up your Looker environments to configuring views and models using LookML. As you progress, you’ll delve into more advanced topics, such as navigating data in Explore, tailoring dashboards to your needs, and adding dynamic elements for interactivity. Along the way, you'll gain invaluable troubleshooting skills to tackle common issues and optimize your Looker usage, ensuring a smooth and seamless experience. Furthermore, the book extends your understanding beyond the basics, equipping you with the knowledge you need to develop Looker applications and seamlessly integrate them with other tools and applications. You'll also explore advanced techniques for harnessing Looker's full potential, empowering you to establish data-driven decision-making and innovation within your organization. By the end of this BI book, you'll have gained a solid understanding of how to use Looker to find important information, make tasks easier, and derive important insights.

Who is this book for?

If you’re a business analyst, data analyst, or BI developer who wants to get well-versed with the features of Looker, this book is for you. Basic knowledge of business intelligence is required to get started.

What you will learn

  • Understand Looker's key components, including LookML, data models, and dashboards.
  • Explore Looker's functionality, including custom fields, calculations, and visualizations.
  • Work with Looker dashboards using dynamic elements like links and actions.
  • Use different types of filters for dimensions to create dashboards
  • Develop Looker applications using essential tools and frameworks
  • Explore additional applications for the Looker organization
  • Integrate Looker with other tools using APIs, connectors, and data pipelines

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 24, 2024
Length: 256 pages
Edition : 1st
Language : English
ISBN-13 : 9781800563285
Vendor :
Google
Category :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning

Product Details

Publication date : May 24, 2024
Length: 256 pages
Edition : 1st
Language : English
ISBN-13 : 9781800563285
Vendor :
Google
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 156.97
Data Engineering with Google Cloud Platform
$41.99
Business Intelligence with Looker Cookbook
$39.99
Data Quality in the Age of AI
$74.99
Total $ 156.97 Stars icon

Table of Contents

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

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(2 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Silja Märdla Oct 03, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I read it cover to cover, to remind myself of all the options out there. I wanted to make sure I don’t forget something essential when working on Looker design and guidelines for my organisation. For me, the little suggestions alog the lines of “ususally this functionality can be used for…” were very helpful to get me thinking about how I want to do things.Thinking back on how I first started learning Looker, this book would have been useful. It does start from the very beginning of how you get started, but then goes on to cover most of the functionality. Meaning, you’ll be able to do more than someone who just completed a 1-hour “getting started” tutorial. And, you will have a solid understanding of the big picture of what the tool offers and where your own work stands relative to the full offering.It’s a reasonably quick read: it describes what you can do, shares an example and moves on to the next thing. If you have any previous experience with any other BI tool, but you want to learn a new tool, this book will be perfect for you. It’s probably not a book you can use to learn data and business intelligence from scratch, especially if you’re not very tech savvy.
Amazon Verified review Amazon
S. Jun 24, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I just finished reading "Business Intelligence with Looker Cookbook" by Khrystyna Grynko. The guide comprehensively covers every aspect of Looker, but it could benefit from more tips on speeding up processes, especially when using Looker ML models. I revised several familiar concepts and learned about new features, such as embedding Looker into external websites and integrating it with platforms like Google Sheets and Looker Studio. However, I missed information on integrating with Gemini. Overall, it's a must-read for mastering Looker and streamlining data visualization processes.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.