
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
Generate Data Insights on the order item table
/ 30
Use Table Explorer to review details of the location table
/ 30
Query the order item table without code
/ 40
Imagine you're a detective trying to solve a mystery, but instead of clues, you have multiple, massive spreadsheets of data.
You are a new data analyst for Data Beans, a company specializing in data collection, analytics, and insights for mobile coffee truck companies throughout your country. It is your first week at the company, and you have been tasked with exploring the company's data related to the coffee trucks, menu, and orders. Your onboarding buddy recommends that you use BigQuery with the table explorer and data insight features to learn about the data and gain insights from it. These features will help you to get started with exploring the company's data and gain insights from it without having to write SQL queries from scratch.
In this lab, you learn how to:
Once you complete these objectives, you will also review the menu and order tables using either of these features as an open activity.
Finally, you will have time to reflect on what you have learned in this lab and consider how you could apply the table explorer and data insights features to your own use cases by answering questions in your Lab Journal.
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 in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the left is the Lab Details pane with the following:
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab Details pane.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Details pane.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
In this task, you will enable data insights on the order_item
table within the coffee_on_wheels
dataset.
Data insights is a tool for anyone who wants to explore their data and gain insights without writing complex SQL queries.
In the Google Cloud console, on the Navigation menu, click BigQuery.
Click DONE on the welcome pop-up.
In the Explorer panel, expand the coffee_on_wheels
dataset at the bottom of the list.
Expand the coffee_on_wheels dataset. You see the order_item
table.
Click the order_item table. You see the order_item
schema displayed. Review the details of the schema.
Click the INSIGHTS tab. You see a message stating "Insights have not yet been generated." This is normal, because the insights have never been generated in your lab environment.
Click the GENERATE INSIGHTS button.
From the Region dropdown select order_item
table.
order_item
table later.
Click Check my progress to verify the objective.
While you are waiting for the insights to be generated, you will use the table explorer feature of BigQuery to review the location
table included with the coffee_on_wheels
dataset. You will also build a basic query with the table explorer to find all fields associated with Coffee Cart Connection, Empire Espresso, and Street Sips trucks.
In the Explorer panel, click the location table. You see the location
table schema displayed. Review the details of the schema.
Click the TABLE EXPLORER tab. Notice how the BigQuery studio page changes where you have the Distinct Values section at the top and the Generated Query section at the bottom, with the query below.
You will work in the Distinct Values section. When you add fields using the SELECT FIELDS
button, you will see the query change in the Generated Query section.
Click SELECT FIELDS. You see all the fields in the table displayed.
Select all the fields and click SAVE. Now you see an interactive card for each field. Interactive cards show the most common values for each field in the dataset. The values in each card can be used to modify the query. However, you can only use one card as a filter (Where clause) in your SQL statement.
You are going to create a new query using the location_name
card. Click:
Also notice that the query is:
Click APPLY. Notice how the other values in the other cards change.
Click COPY TO QUERY.
A new Untitled query
tab opens in BigQuery studio.
Click RUN. The result is 3 rows with the city_id
, company_id
, location_id
, location_name
, and location_type
of each of these trucks.
Congratulations! You have just written your first query with table explorer without using SQL code.
In summary, table explorer is a tool for getting started with data exploration in BigQuery, especially if you're new to SQL or want a quick way to understand your data.
Here are some key things to remember about table explorer:
Click Check my progress to verify the objective.
The insights you generated in an earlier task are now ready. In this task, you will use a prompt generated from these insights to query the order_item
table without using code.
In the Explorer panel, click the order_item table. Review the schema with the associated fields.
Click INSIGHTS. Remember: earlier, you generated the insights, and you should see these insights listed at this point.
Review the list of insights, and search for an insight similar to the one below:
order_item
table. Feel free to re-generate insights as needed by using the GENERATE INSIGHTS button if you want to work with this example prompt.
Once you find a similar insight, expand the insight to reveal the underlying SQL code for it. You should see a query similar to the one below:
Click COPY TO QUERY. A new tab opens in BigQuery Studio. It is called "Untitled Query" with the question (the prompt that generated the query) and the query included.
Click RUN. The query will run, and you will see the result. Notice that the results include two fields: the menu ID and the total revenue generated for each menu item. This is helpful, but we don't quickly know which item has the most revenue, and the total revenue field includes extraneous decimal places. You can fix that again without SQL code.
Select the query.
To the immediate left of the SELECT statement, click , and then click Transform. You see a dialog with an empty text field and a GENERATE button. Here, you can transform the query based on natural language.
Enter the prompt below:
Click GENERATE. You will see the original query with red background text and the modified query with green background text.
If you agree with the newly suggested query, click INSERT. The query is inserted back into the Untitled Query tab and should look like this:
Click RUN. Notice that the total_revenue
field is now formatted where results only have two decimal places.
Select the query.
To the immediate left of the SELECT statement, click and then click Transform.
Enter the prompt below:
Click GENERATE. You will see the original query with red background text, and the modified query with green background text.
If you agree with the newly suggested query, click INSERT. The query is inserted back into the Untitled Query tab and should look similar to:
Click RUN. Notice that the total_revenue field is now in descending order, with the menu items with the most total revenue displayed first.
Congratulations! You have successfully used data insights to select an insight and transform it without using SQL code.
In summary, BigQuery data insights is a tool for anyone who wants to explore their data and gain insights without writing complex SQL queries.
Here are some key things to remember about BigQuery insights:
Which insights did you find most useful with the order_item
table?
Considering your data and use cases for BigQuery, how would you use the data insights feature?
Click Check my progress to verify the objective.
In this task, you explore the remaining menu and order tables in the coffee_on_wheels dataset and answer the questions below using your Lab Journal. Now that you have learned about the data insights and table explorer tools, we suggest you use them to answer these questions, or even write your own queries if you choose to do so. However, be mindful of the remaining time left for this lab. Once the clock gets to 5 minutes left, we suggest you confirm you have completed all progress checks to get credit for completing the lab.
Find the top three items with the highest average prices for each size.
Find all orders from location_id 37.
For your use cases, which tool, table explorer or data insights, would help you the most? Why?
Once you have answered the questions, feel free to review the Lab Journal Solutions.
In this lab, you learned how to generate data insights, and use these insights to query the coffee_on_wheels dataset without code. You also learned how to use the table explorer to explore the location table and generate basic queries without code. Finally, you considered how to apply these features to your own data and use cases with BigQuery.
Consider taking what you have learned in this lab and your journal responses and share them with your team. You can learn more with the links below:
...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 on February 25, 2025
Lab last tested on February 25, 2025
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