Preparing and using data for analysis · Topic 3 of 3

Sharing Data, Datasets and Reports

Define sharing rules, publish datasets and reports, and use BigQuery sharing (Analytics Hub) listings and data clean rooms to share without copies.

  • 5 min
In a nutshell
  • Define who, what, how and who pays before choosing a mechanism.
  • Authorized views and datasets share subsets without source access.
  • BigQuery sharing listings create read-only linked datasets with no copy.

What it is

Sharing data means giving other teams, partners or the public access to data and insights without losing control of it. You define the rules, publish datasets or reports, and prefer mechanisms that share live data in place over exported copies that go stale and escape governance.

Ruleswho, what, howPublishviews, listings, reportsSubscriberslinked datasetsMonitorusage and access

How it works

Defining rules to share data

Answer four questions before choosing a mechanism.

QuestionTypical controls
Who receives it?Internal groups, partner organizations, the public
What may they see?Whole tables, a subset through views, masked columns, filtered rows, aggregates only
How may they use it?Query only; copying and export restricted; aggregate results only
Who pays?Provider pays storage; consumers pay for their own queries

Organization policies still apply. Domain restricted sharing blocks IAM grants to outside identities, so partner sharing needs the partner's customer ID added to the allowed list or a policy exception on the sharing project.

Sharing mechanisms in BigQuery

MechanismFits
IAM on a dataset or tableInternal teams that need the whole object
Authorized view or authorized datasetA subset of columns or rows, without access to the source tables
Row access policies and policy tag maskingThe same table with different visibility per group
BigQuery sharing (Analytics Hub) listingCurated, discoverable sharing with many internal or external subscribers
Data clean roomPartners combine data for joint analysis without seeing each other's rows
-- a partner-safe view in its own dataset
CREATE VIEW partner_share.p42_orders AS
SELECT order_id, order_date, sku, qty
FROM sales.order_facts
WHERE partner_id = 'P42';

GRANT `roles/bigquery.dataViewer`
ON SCHEMA partner_share
TO 'group:analysts@partner42.example';

The view must also be added as an authorized view on the sales dataset, so it can read the source while the partner cannot.

BigQuery sharing (Analytics Hub)

ConceptMeaning
Data exchangeA container for listings, private to chosen users or public
ListingA shared dataset with description, documentation and contact
Linked datasetCreated in the subscriber's project; read-only and live, with no copy
Subscriber permissionsGranted on the exchange or listing
Egress controlsRestrict copying and exporting of shared data
Usage metricsShow the provider who subscribes and how data is used

Subscribers query the linked dataset with their own project, so they pay for their queries. The provider updates the source once and every subscriber sees the change.

Exam tip

"Share with many partners, let them discover and subscribe, keep one copy, and stop them exporting the data" is the description of BigQuery sharing listings with egress controls.

Data clean rooms

A data clean room is a type of exchange where providers add analysis rules. With an aggregation threshold, subscribers can only see results that group at least a set number of entities, never individual rows. Differential privacy rules add calibrated noise for stronger guarantees.

Publishing datasets

AudienceApproach
Internal organizationPrivate exchange with listings per data product
Public or open dataPublic listing, or a dataset readable by all authenticated users
Paying customersCommercial listing through Google Cloud Marketplace
Files for many readersCloud Storage with Requester Pays, so downloaders pay transfer costs

Publishing reports and visualizations

ToolSharing options
Looker StudioShare as viewer or editor with users or groups, link sharing, scheduled email delivery
LookerFolder permissions, scheduled deliveries, embedded dashboards in applications
Connected SheetsShare the sheet; viewers need BigQuery access to refresh

Check the data source credentials before publishing a report widely. Owner's credentials expose whatever the owner can see to every viewer.

A worked example

A payments company wants to share daily merchant statistics with 300 partner banks, and bank analysts must not export raw rows. It also wants to measure overlap between its customers and one retailer's customers without either side seeing the other's list.

The engineer publishes a curated dataset as a listing in a private exchange, grants each bank subscriber access and turns on egress restrictions. For the retailer, a data clean room with an aggregation threshold lets both sides count matches only in groups.

Curated datasetListingprivate exchangeBank projectslinked datasetsCompany dataClean roomaggregation thresholdRetaileraggregate results only

How the exam asks about this

  • "Share a live dataset with external partners without copying it, and let the provider see usage." A BigQuery sharing (Analytics Hub) listing; partners subscribe with linked datasets.
  • "Partners may query only five columns of a table that also holds PII." An authorized view in a separate dataset shared with the partner.
  • "Two companies must analyse combined customer data without exposing individual records." A data clean room with an aggregation threshold analysis rule.

What to remember for the exam

  • Define who, what, how and who pays before choosing a mechanism.
  • Authorized views and datasets share subsets without source access.
  • BigQuery sharing listings create read-only linked datasets with no copy.
  • Egress controls restrict copying and exporting of shared data.
  • Data clean rooms enforce aggregate-only analysis between parties.
Watch out

Exporting tables to CSV for partners breaks governance. The copy goes stale, cannot be revoked and escapes masking and audit logs.

Common mistakes

Copying data into each partner's project. Linked datasets share one live source instead.

Granting partners access to the source dataset. Share a view or listing, not the raw tables.

Forgetting who pays. Subscribers pay for their own queries on linked datasets; design budgets accordingly.

Check yourself

  • What does a subscriber get when subscribing to a BigQuery sharing listing?

    A read-only linked dataset in their own project that reads the provider's live data without a copy.

  • Why must a shared view be authorized on the source dataset?

    An authorized view can read the source tables on behalf of users who have no access to those tables.

  • Which feature lets two parties join data while only seeing aggregated results?

    A data clean room with analysis rules such as an aggregation threshold.

Topic 3 of 3 in Preparing and using data for analysis

Test yourself on Preparing and using data for analysis

The full Google Cloud Professional Data Engineer question bank has 733 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Google Cloud. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.