
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Create a view
/ 50
Join view to an explore
/ 50
Looker is a modern data platform in Google Cloud that lets you analyze and visualize your data interactively. You can use Looker to do in-depth data analysis, integrate insights across different data sources, build actionable data-driven workflows, and create custom data applications.
LookML (Looker Modeling Language) generates abstracted SQL and provides a modeling layer between the database and user. It is Looker’s proprietary language that provides an abstraction layer for SQL databases.
Specifically, LookML is a language for describing dimensions, aggregates, calculations, and data relationships in a SQL database. Looker uses a model written in LookML to construct SQL queries against a particular database. It creates the layer between that SQL database and how the business user interacts with it.
As such, it defines many different things, like how to join tables, how to define custom tables, how to define fields from the database, and the logic for new fields. In this lab, you get hands-on experience with the fundamentals of LookML.
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
When ready, click Start Lab.
The Lab Details pane appears with the temporary credentials that you must use for this lab.
If you need to pay for the lab, a pop-up opens for you to select your payment method.
Notice your lab credentials in the Lab details pane. You use them to sign in to the Looker instance for this lab.
Click Open Looker.
Enter the provided Username and Password in the Email and Password fields.
Username:
Password:
Click Log In.
After a successful login, you see the Looker instance for this lab.
The hierarchy of LookML is structured using the following objects:
COUNT
of customers or a SUM
of cost).The highest-level LookML object is the project. A project is essentially a library of code that typically maps 1:1 to a data source or database connection. You can think of each project as an almost independent mini-instance or microcosm of Looker.
Schemas that cannot be joined together usually reside in different projects because there is no relation to be made across the two datasets. This depends on your database dialect and database user permissions.
A key concept to remember is: if it’s possible in your SQL dialect, it should be possible in Looker. If you can go to your database console and hand-write a SELECT
statement that does a thing, you can also code LookML so that Looker does the same thing.
You can share content from one project to another via a feature called Project Import, if necessary, and if it’s enabled for your instance, but this is an advanced approach to setting up your model architecture and not in the scope of this lab.
Models are the next level of hierarchy and contain:
Models contain data connection information and definitions of Explores. Models can be used to restrict user access to certain Explores and separate and organize Explores by business area.
Explores are one or more views joined together, usually to target a specific business question. Explores should be organized around business themes to minimize confusion for users.
Explores are the “drivers” of analysis on the frontend. They include one or more views joined together, and each usually targets a specific business question. Think of an Explore as a predefined set of tables that would frequently be joined for business inquiries and use cases.
Views are where you define dimensions (which are the data attributes) and measures (which are aggregations of dimensions). Think of views as tables that bundle related fields. There are a few different types of views:
The lowest level of a LookML object are fields, which can be dimensions or measures. Dimensions are created for any columns that are already in your database tables when the view files are generated from a table by Looker.
You can also create additional dimensions that would serve as logical representations of table columns. These appear in the SELECT
and GROUP BY
clause of a SQL statement. They are the “attributes” that describe your data.
Measures are aggregates that do not live explicitly in your database tables. They must be created in LookML. They aggregate dimensions into values like sums or counts.
Note that they do not appear in the GROUP BY
statement of the SQL generated by Looker. Instead, they depend on dimensions to determine that grouping.
To recap, a project is a library of code that models a data source and should map 1:1 to a Git repository. Projects contain:
Dimensions and measures are defined within view files.
Projects can also include dashboards defined in LookML to prevent business users from editing them, maintain version control, and sync them across Looker instances if your company has more than one. LookML dashboards are not in the scope of this training.
There are other types of project files, such as documents and manifests, which are not in the scope of this lab. If you're interested, you can refer to the Understanding other project files documentation.
In this section, you will create a new view and add some dimensions and measures to it.
Click the Develop tab and then select the qwiklabs-ecommerce
LookML project.
To create the file at the project’s root level, click the + button at the top of the file browser in the Looker IDE.
Select Create View. Name the file users_limited
. Click Create.
After you have created your new view, click the arrow next to the views folder to see a list of the existing views for the project.
To put your view file into the views folder, click and hold the users_limited
file and drag it into the expanded folder. Your project should resemble the following:
Now that you have created a new view file and organized it in your project file browser, you're ready to add some content to it.
qwiklabs_ecommerce
project. This is the same table for users.view
. Add the following code on line 2:id
, country
, email
, first_name
, and last_name
:Click Validate LookML and then click Commit Changes & Push.
Add a commit message and click Commit.
Lastly, click Deploy to Production.
Click Check my progress to verify the objective.
In the file browser, under the models folder, navigate to the training_ecommerce.model
file.
In the explore: events
definition, add a new line after join: users
, and paste the following:
Under Users Limited, select the First Name dimension and the Count measure.
Click Run. Your visualization should resemble the following:
training_ecommerce.model
file.Click Validate LookML and then click Commit Changes & Push.
Add a commit message and click Commit.
Lastly, click Deploy to Production.
Click Check my progress to verify the objective.
In this lab, you learned how to define and read core LookML terms and concepts. You then learned how to organize and understand the main LookML structures and hierarchy, created a view, added dimensions and measures to it, and joined the view to an existing Explore.
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual Last Updated April 22, 2024
Lab Last Tested October 21, 2021
Copyright 2025 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one