Search icon CANCEL
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

Arrow left icon
Profile Icon Khrystyna Grynko
Arrow right icon
R$50 per month
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (2 Ratings)
Paperback May 2024 256 pages 1st Edition
eBook
R$178.99
Paperback
R$222.99
Subscription
Free Trial
Renews at R$50p/m
Arrow left icon
Profile Icon Khrystyna Grynko
Arrow right icon
R$50 per month
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (2 Ratings)
Paperback May 2024 256 pages 1st Edition
eBook
R$178.99
Paperback
R$222.99
Subscription
Free Trial
Renews at R$50p/m
eBook
R$178.99
Paperback
R$222.99
Subscription
Free Trial
Renews at R$50p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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 : 9781800560956
Vendor :
Google
Category :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
R$50 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
R$500 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 R$25 each
Feature tick icon Exclusive print discounts
R$800 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 R$25 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total R$ 874.97
Data Engineering with Google Cloud Platform
R$233.99
Business Intelligence with Looker Cookbook
R$222.99
Data Quality in the Age of AI
R$417.99
Total R$ 874.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

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.