
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
Query a public dataset (dataset: usa_names, table: usa_1910_2013)
/ 30
Create a new dataset
/ 40
Query new dataset
/ 30
Storing and querying massive datasets can be time consuming and expensive without the right hardware and infrastructure. BigQuery is an enterprise data warehouse that solves this problem by enabling super-fast SQL queries using the processing power of Google's infrastructure. Simply move your data into BigQuery and let us handle the hard work. You can control access to both the project and your data based on your business needs, such as giving others the ability to view or query your data.
You access BigQuery through the Cloud Console, the command-line tool, or by making calls to the BigQuery REST API using a variety of client libraries such as Java, .NET, or Python. There are also a variety of third-party tools that you can use to interact with BigQuery, such as visualizing the data or loading the data. In this lab you access BigQuery using the Cloud Console.
Using BigQuery in the Cloud Console will give you a visual interface to complete tasks like running queries, loading data, and exporting data. This hands-on lab shows you how to query tables in a public dataset and how to load sample data into BigQuery through the Cloud Console.
In this lab you:
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.
The BigQuery console provides an interface to query tables, including public datasets offered by BigQuery.
The Welcome to BigQuery in the Cloud Console message box opens. This message box provides a link to the quickstart guide and the release notes.
The BigQuery console opens.
In this section, you load a public dataset, USA Names, into BigQuery, then query the dataset to determine the most common names in the US between 1910 and 2013.
In the Explorer pane, click + ADD.
In ADD Data window, select Star a project by name.
Enter project name as bigquery-public-data
and click STAR.
The project bigquery-public-data
is added to your resources and you see the dataset usa_names
listed in the left pane in your Explorer section under bigquery-public-data
.
Click usa_names to expand the dataset.
Click usa_1910_2013 to open that table.
Query bigquery-public-data.usa_names.usa_1910_2013
for the name and gender of the babies in this dataset, and then list the top 10 names in descending order.
Click Query > In a new tab.
Remove the default query text in the Query editor.
Copy and paste the following query into the query EDITOR text area:
BigQuery displays a green check mark icon if the query is valid. If the query is invalid, a red exclamation point icon is displayed. When the query is valid, the validator also shows the amount of data the query processes when you run it. This helps to determine the cost of running the query.
The query results opens below the Query editor. At the top of the Query results section, BigQuery displays the time elapsed and the data processed by the query. Below the time is the table that displays the query results. The header row contains the name of the column as specified in GROUP BY
in the query.
Click Check my progress to verify the objective.
In this section, you create a custom table, load data into it, and then run a query against the table.
The file you're downloading contains approximately 7 MB of data about popular baby names, and it is provided by the US Social Security Administration.
yob2014.txt
to see what the data looks like. The file is a comma-separated value (CSV) file with the following three columns: name, sex (M
or F
), and number of children with that name. The file has no header row.yob2014.txt
file so that you can find it later.In this section, you create a dataset to hold your table, add data to your project, then make the data table you'll query against.
Datasets help you control access to tables and views in a project. This lab uses only one table, but you still need a dataset to hold the table.
Back in the console, in the Explorer section, click on the View actions icon next to your project ID and select Create dataset.
On the Create dataset page:
babynames
.Currently, the public datasets are stored in the US multi-region location. For simplicity, place your dataset in the same location.
Click Check my progress to verify the objective.
In this section, you load data into the table you made.
Use the default values for all settings unless otherwise indicated.
yob2014.txt
file and click Open.names_2014
.Now that you've loaded data into your table, you can run queries against it. The process is identical to the previous example, except that this time, you're querying your table instead of a public table.
Click Check my progress to verify the objective.
You queried a public dataset, then created a custom table, loaded data into it, and then ran a query against that table.
For more information about BigQuery, see BigQuery Documentation and BigQuery Public Datasets.
...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 October 2, 2023
Lab Last Tested October 2, 2023
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