
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 Authorized Views
/ 20
Assign IAM permisssions to both the views
/ 20
Grant permissions to the users to access the views
/ 20
Display insights for View A
/ 20
Display insights for View B
/ 20
A common scenario is where a Google Cloud Data Sharing Partner has proprietary datasets that customers can use for their analytics use cases. Customers need to subscribe to this data, query it within their own platform, then augment it with their own datasets and use their visualization tools for their customer facing dashboards. This enables Data Sharing Partners to simplify and accelerate how they build and deliver value from data-driven solutions.
Through integration with Google Cloud IAM, you can set permissions on BigQuery objects to enable access by users inside or outside of organizations. In this lab, you will learn how both Data Sharing Partners and their customers can use BigQuery data stored in a partner project in the form of customer facing dashboards for analytics as a managed service. You will be given three projects: the Data Sharing Partner project which owns the dataset and two separate and distinct customers who can access a subset of the dataset from their respective projects. Customers will list customer information specific to their geographical region.
In this lab, you will:
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 the first project, you will take on the role of a Data Sharing Partner creating and sharing a dataset using an authorized view.
From the lab pane. open the Data Sharing Partner Project Console and log in with the associated credentials.
From the Navigation Menu, go to BigQuery > BigQuery Studio. If prompted click Done.
Click on + (Create SQL query) where you can run your query.
Run the following query to create an authorized view for Customer A, based on a public geographical dataset.
Click Run.
From the toolbar, click Save > Save View.
Keep the project as default and for the Dataset select demo_dataset
.
For Table type authorized_view_a
.
Click Save.
In the query editor, remove the previous query you just ran.
Run the following query to create an authorized view for Customer B, based on a public geographical dataset.
Click Run.
From the toolbar, click Save View > Save View as.
Keep the project as default and for the Dataset select demo_dataset
.
For Table type authorized_view_b
.
Click Save.
Your authorized views should resemble the following:
Click Check my progress to verify your performed task.
Add Authorized View A that needs to be authorized to share:
.
Click Add Authorization.
Add Authorized View B that needs to be authorized to share:
.
Click Add Authorization. Your authorized views should resemble the following:
Click Check my progress to verify your performed task.
In this section, you will assign permissions for each customer user and their associated authorized views.
Under your project, inside of demo_dataset, open the authorized_view_a
view.
Click Share.
Click on Add Principal and add the Customer A user:
Select the BigQuery Data Viewer role.
Click Save.
Click Close.
Under your project, inside of demo_dataset, open the authorized_view_b
view.
Click Share.
Click on Add Principal and add the Customer B user:
Select the BigQuery Data Viewer role.
Click Save.
Click Close.
Click Check my progress to verify your performed task.
In this section, you will verify that the authorized views were shared for each customer user correctly.
Close the Data Sharing Partner Project Console and from the lab pane open the Customer Project A Console. Log in with the associated credentials.
From the Navigation Menu, go to BigQuery > BigQuery Studio. If prompted click Done.
Click on + (Create SQL query) where you can run your query.
Now you will join the data from Customer A's authorized view to the customer specific dataset to generate new insights.
Your results should resemble the following:
On the query toolbar, select Save > Save View.
Click in the Dataset field and select customer_a_dataset
.
In the Table field, type customer_a_table
.
Click Save. You should now be able to see the dataset and table, as well as query it.
Open Looker Studio.
On the Reports page, in the Start with a Template section, click the Blank Report template. This creates a new untitled report.
Click the Blank Report template again.
In the Add data to report window, in the search box, enter BigQuery
.
Click the BigQuery Connector.
For Authorization, click Authorize. This action lets Looker Studio access to your Google Cloud project.
customer_a_dataset
> customer_a_table
.Click Add.
When prompted, click Add to Report.
At the top of the page, click Untitled Report to change the report name. Type Customer A Visualization
.
After the report editor loads, click Insert > Pie chart.
On the Pie Chart Data tab, notice the value for Data Source (customer_a_table
) and the default values for Dimension and Metric: zip_code
and Record Count
.
Drag city
from Available Fields onto the zip_code
dimension to replace it.
The visualization should resemble the following:
In the pop-up dialogue, click Copy Link and save it somewhere. Exit out of the window.
Click the student profile in the top right and click Sign out.
Log in with the Customer B user credentials.
You will be taken to your Google Account home page.
Open a new tab and navigate to the Looker Studio link you copied earlier.
Upon logging in as Customer B, you should not be able to access the Analytics Dashboard of Customer A since you are not authorized.
Click Check my progress to verify your performed task.
Close the Customer Project A Console and from the lab pane open the Customer Project B Console. Log in with the associated credentials.
From the Navigation Menu, go to BigQuery > BigQuery Studio. If prompted click Done.
Click on + (Create SQL query) where you can run your query.
Now you will join the data from Customer B's authorized view to the customer specific dataset to generate new insights.
Your results should resemble the following:
On the query toolbar, select Save > Save View.
Click in the Dataset field and select customer_b_dataset
.
In the Table field, type customer_b_table
.
Click Save. You should now be able to see the dataset and table, as well as query it.
Open Looker Studio.
On the Reports page, in the Start with a Template section, click the Blank Report template. This creates a new untitled report.
If prompted, complete Account setup settings and then click Continue.
Click the Blank Report template again.
In the Add data to report window, in the search box, enter BigQuery
.
Click the BigQuery Connector.
For Authorization, click Authorize. This action lets Google Looker Studio access to your Google Cloud project.
customer_b_dataset
> customer_b_table
.Click Add.
When prompted, click Add to Report.
At the top of the page, click Untitled Report to change the report name. Type Customer B Visualization
.
After the report editor loads, click Insert > Pie chart.
On the Pie Chart Data tab, notice the value for Data Source (customer_b_table
) and the default values for Dimension and Metric: zip_code
and Record Count
.
Drag city
from Available Fields onto the zip_code
dimension to replace it.
The visualization should resemble the following:
In the pop-up dialogue, click Copy Link and save it somewhere. Exit out of the window.
Click the student profile in the top right and click Sign out.
Log in with the Customer A user credentials.
You will be taken to your Google Account home page.
Open a new tab and navigate to the Looker Studio link you copied earlier.
Upon logging in as Customer A, you should not be able to access the Analytics Dashboard of Customer B since you are not authorized.
Click Check my progress to verify your performed task.
In this lab, you learned how to copy datasets from a Data Sharing Partner to a customer's BigQuery project, create distinct authorized views for each customer, and consume the authorized views to create customer-specific dashboards.
...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 July 17, 2024
Lab Last Tested July 17, 2024
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