arrow_back

Analytics as a Service for Data Sharing Partners

로그인 가입
700개 이상의 실습 및 과정 이용하기

Analytics as a Service for Data Sharing Partners

실습 30분 universal_currency_alt 크레딧 1개 show_chart 입문
info 이 실습에는 학습을 지원하는 AI 도구가 통합되어 있을 수 있습니다.
700개 이상의 실습 및 과정 이용하기

GSP1042

Google Cloud self-paced labs logo

Overview

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.

overview diagram

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.

Objectives

In this lab, you learn how to:

  • Copy a public dataset into a Data Sharing Partner Project.
  • Create distinct authorized views for each customer.
  • Consume the authorized views to create customer-specific dashboards.

Setup and Requirements

Before you click the Start Lab button

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:

  • Access to a standard internet browser (Chrome browser recommended).
Note: Use an Incognito (recommended) or private browser window to run this lab. This prevents conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
  • Time to complete the lab—remember, once you start, you cannot pause a lab.
Note: Use only the student account for this lab. If you use a different Google Cloud account, you may incur charges to that account.

How to start your lab and sign in to the Google Cloud console

  1. 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:

    • The Open Google Cloud console button
    • Time remaining
    • The temporary credentials that you must use for this lab
    • Other information, if needed, to step through this lab
  2. 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.

    Note: If you see the Choose an account dialog, click Use Another Account.
  3. If necessary, copy the Username below and paste it into the Sign in dialog.

    {{{user_0.username | "Username"}}}

    You can also find the Username in the Lab Details pane.

  4. Click Next.

  5. Copy the Password below and paste it into the Welcome dialog.

    {{{user_0.password | "Password"}}}

    You can also find the Password in the Lab Details pane.

  6. Click Next.

    Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials. Note: Using your own Google Cloud account for this lab may incur extra charges.
  7. Click through the subsequent pages:

    • Accept the terms and conditions.
    • Do not add recovery options or two-factor authentication (because this is a temporary account).
    • Do not sign up for free trials.

After a few moments, the Google Cloud console opens in this tab.

Note: To access Google Cloud products and services, click the Navigation menu or type the service or product name in the Search field. Navigation menu icon and Search field

Create authorized views

In the first project, you will take on the role of a Data Sharing Partner creating and sharing a dataset using an authorized view.

Create Authorized View A

  1. From the lab pane. open the Data Sharing Partner Project Console and log in with the associated credentials.

  2. From the Navigation Menu, go to BigQuery > Studio. If prompted click Done.

  3. Click on + (SQL query) where you can run your query.

  4. Run the following query to create an authorized view for Customer A, based on a public geographical dataset.

SELECT * FROM `bigquery-public-data.geo_us_boundaries.zip_codes` WHERE state_code="TX" LIMIT 4000
  1. Click Run.

  2. From the toolbar, click Save > Save view.

  3. Keep the project as default and for the Dataset select demo_dataset.

  4. For Table type authorized_view_a.

  5. Click Save.

Create Authorized View B

  1. In the query editor, remove the previous query you just ran.

  2. Run the following query to create an authorized view for Customer B, based on a public geographical dataset.

SELECT * FROM `bigquery-public-data.geo_us_boundaries.zip_codes` WHERE state_code="CA" LIMIT 4000
  1. Click Run.

  2. From the toolbar, click Save View > Save view as.

  3. Keep the project as default and for the Dataset select demo_dataset.

  4. For Table type authorized_view_b.

  5. Click Save.

Your authorized views should resemble the following:

authorized views

Click Check my progress to verify your performed task.

Created Authorized Views

Assign IAM permissions to both the views

  1. From the BigQuery Explorer pane, open the demo_dataset and click + Sharing > Authorize views.

authorize views

  1. Add Authorized View A that needs to be authorized to share: .demo_dataset.authorized_view_a.

  2. Click Add authorization.

  3. Add Authorized View B that needs to be authorized to share: .demo_dataset.authorized_view_b.

  4. Click Add authorization. Your authorized views should resemble the following:

authorized views

  1. Click Close.

Click Check my progress to verify your performed task.

Assign IAM permissions to both the views

Grant permissions to the users to access the views

In this section, you will assign permissions for each customer user and their associated authorized views.

Assign IAM permissions for Customer A

  1. Under your project, inside of demo_dataset, open the authorized_view_a view.

  2. Click Share.

  3. Click on Add principal and add the Customer A user:

  4. Select the BigQuery Data Viewer role.

add bigquery data viewer principal

  1. Click Save.

  2. Click Close.

Assign IAM permissions for Customer B

  1. Under your project, inside of demo_dataset, open the authorized_view_b view.

  2. Click Share.

  3. Click on Add principal and add the Customer B user:

  4. Select the BigQuery Data Viewer role.

add bigquery data viewer principal

  1. Click Save.

  2. Click Close.

Click Check my progress to verify your performed task.

Grant permissions to the users to access the views

Display insights for View A

In this section, you will verify that the authorized views were shared for each customer user correctly.

Verify authorized view sharing for Customer A

  1. Close the Data Sharing Partner Project Console and from the lab pane open the Customer A Project Console. Log in with the associated credentials.

  2. From the Navigation Menu, go to BigQuery > Studio. If prompted click Done.

  3. Click on + (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.

  1. Run the following query to find all customers in a State. Since the authorized view available to Customer A is filtered on the state of Texas, the query should return only customers in that state.
SELECT geos.zip_code, geos.city, cust.last_name, cust.first_name FROM `{{{consumer_project.project_id|Customer A Project ID}}}.customer_a_dataset.customer_info` as cust JOIN `{{{project_0.project_id|Partner Project ID}}}.demo_dataset.authorized_view_a` as geos ON geos.zip_code = cust.postal_code;
  1. Click Run.

Your results should resemble the following:

customer a query

  1. On the query toolbar, select Save > Save View.

  2. Click in the Dataset field and select customer_a_dataset.

  3. In the Table field, type customer_a_table.

  4. Click Save. You should now be able to see the dataset and table, as well as query it.

Connect BigQuery to Looker Studio

  1. Open Looker Studio.

  2. 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.
  1. Click the Blank Report template again.

  2. In the Add data to report window, in the search box, enter BigQuery.

add bigquery data

  1. Click the BigQuery Connector.

  2. For Authorization, click Authorize. This action lets Looker Studio access to your Google Cloud project.

In the Request for permission dialog, click Allow to give Looker Studio the ability to view data in BigQuery.
  1. Select Recent Projects from the left pane, select > customer_a_dataset > customer_a_table.

connect customer a table

  1. Click Add.

  2. When prompted, click Add to Report.

add data to report

Create a visualization in Looker Studio

  1. At the top of the page, click Untitled Report to change the report name. Type Customer A Visualization.

  2. After the report editor loads, click Insert > Pie chart.

  3. 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.

  4. Drag city from Available Fields onto the zip_code dimension to replace it.

The visualization should resemble the following:

customer a visualization

Verify Analytics security

  1. From the toolbar, expand + Share > Get report link.

get report link

  1. In the pop-up dialogue, click Copy Link and save it somewhere. Exit out of the window.

  2. Click the student profile in the top right and click Sign out.

sign out

  1. Select Use another account.

use another account

  1. Log in with the Customer B user credentials.

  2. You will be taken to your Google Account home page.

  3. Open a new tab and navigate to the Looker Studio link you copied earlier.

cant access report

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.

Display insights for View A

Display insights for View B

Verify authorized view sharing for Customer B

  1. Close the Customer Project A Console and from the lab pane open the Customer B Project Console. Log in with the associated credentials.

  2. From the Navigation Menu, go to BigQuery > Studio. If prompted click Done.

  3. Click on + (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.

  1. Run the following query to find all customers in a State. Since the authorized view available to Customer A is filtered on the state of California, the query should return only customers in that state.
SELECT geos.zip_code, geos.city, cust.last_name, cust.first_name FROM `{{{consumer_project_2.project_id|Customer B Project ID}}}.customer_b_dataset.customer_info` as cust JOIN `{{{project_0.project_id|Partner Project ID}}}.demo_dataset.authorized_view_b` as geos ON geos.zip_code = cust.postal_code;
  1. Click Run.

Your results should resemble the following:

customer b query

  1. On the query toolbar, select Save > Save View.

  2. Click in the Dataset field and select customer_b_dataset.

  3. In the Table field, type customer_b_table.

  4. Click Save. You should now be able to see the dataset and table, as well as query it.

Connect BigQuery to Looker Studio

  1. Open Looker Studio.

  2. 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.

  1. Click the Blank Report template again.

  2. In the Add data to report window, in the search box, enter BigQuery.

add bigquery data

  1. Click the BigQuery Connector.

  2. For Authorization, click Authorize. This action lets Google Looker Studio access to your Google Cloud project.

In the Request for permission dialog, click Allow to give Looker Studio the ability to view data in BigQuery.
  1. Select Recent Projects from the left pane, select > customer_b_dataset > customer_b_table.

connect customer b table

  1. Click Add.

  2. When prompted, click Add to Report.

add data to report

Create a visualization in Looker Studio

  1. At the top of the page, click Untitled Report to change the report name. Type Customer B Visualization.

  2. After the report editor loads, click Insert > Pie chart.

  3. 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.

  4. Drag city from Available Fields onto the zip_code dimension to replace it.

The visualization should resemble the following:

customer b visualization

Verify Analytics security

  1. From the toolbar, expand + Share > Get report link.

get report link

  1. In the pop-up dialogue, click Copy Link and save it somewhere. Exit out of the window.

  2. Click the student profile in the top right and click Sign out.

sign out

  1. Select Use another account.

use another account

  1. Log in with the Customer A user credentials.

  2. You will be taken to your Google Account home page.

  3. Open a new tab and navigate to the Looker Studio link you copied earlier.

cant access report

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.

Display insights for View B

Congratulations!

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.

Google Cloud training and certification

...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 April 23, 2025

Lab Last Tested April 23, 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.

시작하기 전에

  1. 실습에서는 정해진 기간 동안 Google Cloud 프로젝트와 리소스를 만듭니다.
  2. 실습에는 시간 제한이 있으며 일시중지 기능이 없습니다. 실습을 종료하면 처음부터 다시 시작해야 합니다.
  3. 화면 왼쪽 상단에서 실습 시작을 클릭하여 시작합니다.

시크릿 브라우징 사용

  1. 실습에 입력한 사용자 이름비밀번호를 복사합니다.
  2. 비공개 모드에서 콘솔 열기를 클릭합니다.

콘솔에 로그인

    실습 사용자 인증 정보를 사용하여
  1. 로그인합니다. 다른 사용자 인증 정보를 사용하면 오류가 발생하거나 요금이 부과될 수 있습니다.
  2. 약관에 동의하고 리소스 복구 페이지를 건너뜁니다.
  3. 실습을 완료했거나 다시 시작하려고 하는 경우가 아니면 실습 종료를 클릭하지 마세요. 이 버튼을 클릭하면 작업 내용이 지워지고 프로젝트가 삭제됩니다.

현재 이 콘텐츠를 이용할 수 없습니다

이용할 수 있게 되면 이메일로 알려드리겠습니다.

감사합니다

이용할 수 있게 되면 이메일로 알려드리겠습니다.

한 번에 실습 1개만 가능

모든 기존 실습을 종료하고 이 실습을 시작할지 확인하세요.

시크릿 브라우징을 사용하여 실습 실행하기

이 실습을 실행하려면 시크릿 모드 또는 시크릿 브라우저 창을 사용하세요. 개인 계정과 학생 계정 간의 충돌로 개인 계정에 추가 요금이 발생하는 일을 방지해 줍니다.