
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
Grant permissions via IAM for data access
/ 10
Create a new dataset within an existing project and Copy an existing table to newly created dataset
/ 20
Grant permission to the users to access the table
/ 20
Authorize a dataset and grant permission to the users
/ 20
Verify dataset sharing for consumer projects
/ 30
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 to create datasets in BigQuery to share externally. You will be given three projects: the Data Sharing Partner project and two customer projects. You will create and share the dataset inside of the Data Sharing Partner project, and then test the sharing capabilities from the other two customer projects.
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 will be 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:
Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is the Lab Details panel 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 panel.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Details panel.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
Open the Data Sharing Partner Project Console. Log in with the associated credentials.
From the Navigation Menu, go to IAM & Admin > IAM.
Click + GRANT ACCESS at the top to assign a role to principals who needs to access the data.
In the New principals field, enter the customer service account IDs:
In the Select a role field, select the BigQuery User role.
Click Check my progress to verify the objective.
From the Navigation Menu, go to BigQuery > BigQuery Studio.
In the Explorer panel, select the project where you want to create the dataset. Expand the three dots Actions option and click Create dataset.
For Dataset ID, enter demo_dataset
.
For Location type choose Multi-region and select US (multiple regions in United States) from dropdown..
Click Create Dataset.
For the purposes of this lab, you will use a public dataset that you will then copy into a table inside of your project.
The Add window opens.
Click Public Datasets under Additional sources.
In the search bar, type Google Trends
.
Select the Google Trends dataset. Make sure it is not the international dataset.
Click View dataset. The dataset information page should show up.
Click Copy.
For the Destination dataset, click in the box and search/select
.
For Location select us (multiple regions in United States).
Click Copy.
Click Check my progress to verify the objective.
For the purposes of this lab, a dataset and table have been provided for you in BigQuery.
From the Navigation Menu, go to BigQuery > BigQuery Studio.
Under your project, inside of demo_dataset, open the top_terms table.
Click Share.
Click on Add Principal and add the two customer users:
Select the BigQuery Data Viewer role.
Click Check my progress to verify the objective.
.demo_dataset
.Click Add Authorization.
Click on Sharing > Permissions > Add Principal and add the two customer users:
Select the BigQuery User role.
Great! You have successfully shared the dataset and table with the two customer users.
Click Check my progress to verify the objective.
In this section, you will verify the datasets and tables were shared for each customer user.
Close the Data Sharing Partner Project Console and open the Customer Project 1 Console. Log in with the associated credentials.
From the Navigation Menu, go to BigQuery > BigQuery Studio.
Run the following query, which selects all columns from the demo_dataset.top_terms table from the Data Sharing Partner project:
You should now see the results populated.
On the query toolbar, select Save > Save View.
Click in the Dataset field and select Create New Dataset.
customer_1_dataset
Click Create Dataset.
In the Table field, type customer_1_table
.
Click Save.
Refresh your window.
You should now be able to see the dataset and table, as well as query it.
Close the Customer Project 1 Console and open the Customer Project 2 Console. Log in with the associated credentials.
From the Navigation Menu, go to BigQuery > BigQuery Studio.
Run the following query, which selects all columns from the demo_dataset.top_terms table from the Data Sharing Partner project:
You should now see the results populated.
On the query toolbar, select Save > Save View.
Click in the Dataset field and select Create New Dataset.
customer_2_dataset
Click Create Dataset.
In the Table field, type customer_2_table
.
Click Save.
Refresh your window.
You should now be able to see the dataset and table, as well as query it.
Click Check my progress to verify the objective.
In this lab, you learned how to use BigQuery to publish datasets to share externally. You first granted permissions via IAM for data access, copied an existing table to a newly created dataset, then authorized a dataset and granted permissions to the users to access a table. Lastly, you verified the dataset and table were shared properly for both of the customer projects.
...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 November 8, 2024
Lab Last Tested November 8, 2024
Copyright 2024 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.
Ta treść jest obecnie niedostępna
Kiedy dostępność się zmieni, wyślemy Ci e-maila z powiadomieniem
Świetnie
Kiedy dostępność się zmieni, skontaktujemy się z Tobą e-mailem
One lab at a time
Confirm to end all existing labs and start this one