
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
Creating a data source
/ 5
Create a chart using a custom query
/ 5
Data visualization tools can help you make sense of your BigQuery data and help you analyze the data interactively. You can use visualization tools to help you identify trends, respond to them, and make predictions using your data. In this lab, you use Looker Studio to visualize data in the BigQuery table populated by your Dataflow pipeline in the previous exercise. You will not be accessing live streaming data in this lab.
In this lab, you will perform the following tasks:
This lab uses Looker Studio to visualize data in BigQuery using the BigQuery connector. In subsequent tasks, you will create a data source, a report, and charts that visualize data in the sample table.
For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.
Sign in to Qwiklabs using an incognito window.
Note the lab's access time (for example, 1:15:00
), and make sure you can finish within that time.
There is no pause feature. You can restart if needed, but you have to start at the beginning.
When ready, click Start lab.
Note your lab credentials (Username and Password). You will use them to sign in to the Google Cloud Console.
Click Open Google Console.
Click Use another account and copy/paste credentials for this lab into the prompts.
If you use other credentials, you'll receive errors or incur charges.
Accept the terms and skip the recovery resource page.
On the Account Setup dialog box, select your country from the list and, type your company name.
Acknowledge the terms of services, and then click Continue.
On the Preferences page, select No for each option to receive email notifications, and click Continue.
Now that the account is initialized, you need to start the process again.
On the Reports page, in the Start with a Template section, click the Blank Report template. This time it will take you to a new page and begin an Untitled Report.
The Add data to report panel will load from the bottom of the page.
In the Google Connectors section, select BigQuery.
You will be prompted with a You are about to add data to this report notice.
Check Don't show me this again and click Add to report.
Once complete, a simple default tabular report appears. This confirms that you can see your BigQuery data in Looker Studio.
Click Check my progress to verify the objective.
Once you have added the current_conditions data source to the report, the next step is to create a visualization. Begin by creating a bar chart. The bar chart will display the total number of vehicles captured for each highway.
Example:
You may find that it is easier to work with an existing query to produce the desired reports and visualizations in Looker Studio. The Custom Query option lets you leverage BigQuery's full query capabilities such as joins, unions, and analytical functions.
Alternatively, you can leverage BigQuery's full query capabilities by creating a view. A view is a virtual table defined by a SQL query. You can query data in a view by adding the dataset containing the view as a data source.
When you specify a SQL query as your BigQuery data source, the results of the query are in table format, which becomes the field definition (schema) for your data source. When you use a custom query as a data source, Looker Studio uses your SQL as an inner select statement for each generated query to BigQuery. For more information on custom queries in Looker Studio, consult the online help.
To add a bar chart to your report that uses a custom query data source:
From the Add a chart menu select the first Bar chart.
In the Bar chart properties window, on the Setup tab, notice the value for Data Source (current_conditions) and the default values for Dimension and Metric are the same as the previous chart. In the Data Source section, click the current_conditions data source. At the bottom of the pane choose Add data.
Under Google Connectors, select BigQuery.
Select CUSTOM QUERY in the first grouping.
For Billing Project, select your project.
Type the following in the Enter custom query window and replace the <PROJECTID>
with your Project ID:
This query uses max/min/avg functions to give you the corresponding speed for each highway.
Your chart now displays the maximum speed, minimum speed, and average speed for each highway.
Notice each bar has a default color based on the order the metrics were added to the chart.
Click Check my progress to verify the objective.
You can view queries submitted via the BigQuery Connector by examining your query history in the BigQuery web interface. Using the query history, you can estimate query costs, and you can save queries for use in other scenarios.
The Welcome to BigQuery in the Cloud Console message box opens. This message box provides a link to the quickstart guide and lists UI updates.
When you have completed your lab, click End Lab. Google Cloud Skills Boost removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Copyright 2022 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