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

eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Colour book shipped to your preferred address
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
Estimated delivery fee Deliver to Sweden

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

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 Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Colour book shipped to your preferred address
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
Estimated delivery fee Deliver to Sweden

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

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
€18.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
€189.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
€264.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 118.97
Data Engineering with Google Cloud Platform
€31.99
Business Intelligence with Looker Cookbook
€29.99
Data Quality in the Age of AI
€56.99
Total 118.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 the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela