Prepare and test your skills

Prepare and test your skills

BigQuery Analytics Hub (opens in a new tab) is the publication layer for sharing BigQuery assets inside and across organizations without creating unmanaged copies. A publisher creates a data exchange as a container for sharing, publishes listings that describe and grant access to specific assets, and consumers discover and subscribe to those listings. Because administration stays in the publisher project, access can be granted, changed, or revoked centrally while control of the source data remains with the owner.
A data exchange and its listings are the foundation for all Analytics Hub sharing within or outside an organization. The exchange sets the sharing boundary and ownership, while each listing points to one shared asset and defines how a subscriber can use it. A publisher builds sharing in a fixed order because a listing depends on its parent exchange and subscribers depend on the listing for governed access.
Choose exchanges and listings when the goal is curated, repeatable publication to known teams, partners, or a broader audience. The subscriber receives only the access defined by the listing, and the publisher retains the ability to change or revoke that access.
A Pub/Sub topic listing shares real-time streaming data through Analytics Hub instead of a static table snapshot. Data flows from the publisher-owned Pub/Sub topic to each authorized subscriber, so subscribers receive new events as they are published. The publisher retains ownership of the topic and its listing, while subscribers attach and consume within their own projects. Choose Pub/Sub topic sharing when consumers need continuous event streams rather than periodic queries against a dataset.
A data clean room is an Analytics Hub environment for multi-organizational collaboration on sensitive data. The clean room allows participating organizations to bring their governed datasets together and run joint analysis under shared controls, rather than exchanging raw copies outside any boundary. Control stays with each contributor, who administers what data enters the clean room and what analysis is permitted. Choose data clean rooms when the requirement is collaborative insight on restricted data where direct dataset sharing would expose too much.
VPC Service Controls (VPC SC) adds a network and identity perimeter around shared Analytics Hub assets to protect against data exfiltration. The perimeter encloses trusted publisher and subscriber projects on the inside, and traffic that attempts to copy or move data to resources on the outside is denied even when Identity and Access Management (IAM) permissions would otherwise allow access. The shared asset depends on both its listing permission and the perimeter rule, so access requires passing both checks. Apply VPC Service Controls when listings cross trust boundaries and copying data outside the approved perimeter must be blocked.
Google Cloud Marketplace is the commercial channel for Analytics Hub assets. A publisher commercializes an existing exchange listing by offering it as a paid product, so discovery, entitlement, and billing flow through Marketplace to the external buyer. The underlying trust model does not change: the publisher still owns the source and administers the listing, while the buyer receives only the access granted by the listing. Choose Marketplace commercialization when the goal is data monetization beyond internal or partner sharing.
The four sharing patterns differ by use case and control relationship:
| Sharing pattern | Best use | Control relationship |
|---|---|---|
| Standard exchange listing | Share curated datasets within or outside the organization | Publisher administers exchange and listing; subscriber gets governed access |
| Pub/Sub topic listing | Share real-time streaming events | Publisher owns topic; data flows from publisher topic to each subscriber |
| Data clean room | Collaborate on sensitive data across organizations | Each contributor controls its input; joint analysis runs under shared controls |
| Marketplace listing | Commercialize and sell assets externally | Publisher retains source control; buyer access is entitled through Marketplace |
Exam tip: Use standard listings for governed dataset access, data clean rooms for joint analysis of sensitive data, and VPC Service Controls around shared assets when the risk is exfiltration outside the perimeter.
Robust access governance for published datasets is the practice of combining coarse project permissions with fine-grained data filters so each consumer sees only the rows, columns, and derived results they are entitled to see. In BigQuery (opens in a new tab), the publisher keeps the source dataset in its own project and shares it in place, while Identity and Access Management (IAM) roles, authorized resources, row-level policies, and column-level policies enforce the boundary between publisher storage and subscriber queries.
Role-based access control (RBAC) with least privilege is the foundation that grants a user, group, or service account only the minimum permission needed for its role, such as no-access, read-only, or write. The data owner maps IAM roles to identities based on project needs, access patterns, or resource tags, starting from predefined BigQuery roles and creating custom roles when more precise permission sets are required. Granularity is increased with IAM policies with conditions that limit access by attributes such as time, resource, or request context, and with principal access boundary (PAB) policies that cap what an identity can do even when other grants are broader.
This model separates operational control from data access control. A cloud engineering group may grant permission to run jobs or manage infrastructure, while a separate data owner grants permission to read the dataset itself. Because BigQuery separates compute from storage, subscriber queries run with subscriber compute against publisher storage, so the publisher must grant data access explicitly and the subscriber must hold permission to run jobs. VPC Service Controls adds a network perimeter around Google Cloud resources that helps prevent data exfiltration outside the perimeter, and audit trails from Cloud Audit Logs and Cloud Logging record who accessed what to enforce governance policies.
BigQuery sharing is the zero-copy publication path that shares a dataset in place without replication or file movement. The publisher workflow moves in order: first, the publisher creates or selects a shared dataset or Pub/Sub topic in the publisher project; then, the publisher organizes that resource into a listing inside a data exchange; then, the publisher grants subscriber access at the exchange or listing level. Subscribing creates a read-only linked dataset in the subscriber project that is a live pointer to the shared dataset, so queries always see current publisher data without a copy.
A linked dataset is authorized to read its source without requiring the subscriber to hold IAM rights on the underlying source dataset. That authorization extends to standard tables and views plus delegated resources:
Data owners retain control through exchange and listing permissions, data egress options, and usage monitoring. When egress is restricted on a listing, copy, clone, export, snapshot, CREATE TABLE AS SELECT, CREATE VIEW AS SELECT, writing to a destination table or view, and BigQuery Data Transfer Service on the linked dataset become unavailable. Publishers can monitor jobs executed, bytes scanned, rows processed, and subscribers by project and organization to detect overuse or unexpected access.
Row-level security in BigQuery is a table filter that grants access to only a subset of rows based on a row access policy evaluated at query time. The policy defines which rows an identity or group can see, and every query against the table flows from the storage engine through the policy check before rows return to the user. The table itself remains one object, so a regional sales team and a national team can query the same published table while each receives only its allowed rows. Shared datasets support row-level security, so the filter continues to apply when the table is consumed through a linked dataset.
Column-level security in BigQuery is a separate query-time check that grants access to sensitive columns using policy tags or type-based classification. A policy tag is attached to a column such as national identifier, balance, or diagnosis, and a different IAM grant controls who can read that tag. Users without the grant can still query the table but are denied the protected columns, which prevents accidental disclosure when a wide table is published. Sensitive Data Protection helps find columns to tag by scanning for personally identifiable information (PII), financial data, and health information and storing data profiles for review.
The fine-grained controls differ by what they hide and how they enforce it:
| Control | What consumer receives | Enforcement point |
|---|---|---|
| Authorized views | Only rows and columns returned by the view definition | View authorization on the source dataset; consumer needs no source access |
| Row-level security | Full columns but only allowed rows | Row access policy checked at query time on the base table |
| Column-level security | Full rows but only allowed columns | Policy-tag grant checked at query time on each protected column |
| Column data masking | Full rows with sensitive values obscured | Masking rule applied at query time; surrounding data remains readable |
Column data masking complements these controls when a column must remain visible but unreadable to some consumers. Data masking obscures the sensitive value while still permitting access to the surrounding row, and it can also match sensitive patterns to guard against accidental disclosure. BigQuery automatically encrypts data at rest and in transit, with optional customer-managed keys, so masking and fine-grained policies govern visibility while encryption governs storage protection.
Exam tip: Use an authorized view when different consumers need different row and column subsets defined by a query; use row-level security when one table must filter rows by user, and column-level security or masking when one table must hide entire columns or obscure values at query time.
Optimizing a published dataset means making it easy to find through search and catalogs while assigning storage and query costs to the correct project. In Google Cloud, BigQuery sharing (opens in a new tab) publishes data in place without replication, and Knowledge Catalog and Data Catalog make that data searchable through listings and governed metadata. Cost control follows the same split: the publisher retains storage costs and the subscriber pays for the queries or reads it runs.
BigQuery sharing is a publish-and-subscribe exchange that shares BigQuery datasets and Pub/Sub topics across organizational boundaries without copying data. A publisher creates a shared dataset or shared topic in its own project, organizes references to it as listings inside a data exchange, and grants access at the exchange or listing level. A subscriber then discovers the listing, subscribes, and receives a live pointer in its own project — a read-only linked dataset for BigQuery or a linked Pub/Sub subscription for streaming — and queries or reads without additional IAM on the source.
Discovery depends on exchange visibility and catalog indexing. A private data exchange is visible only to granted users or groups, while a public data exchange lets all authenticated Google Cloud users (allAuthenticatedUsers) discover and subscribe to its listings. The same distinction applies to listings: private listings are shared directly with specific users or groups, while public listings in a public exchange can reference free public resources or commercial resources. Cloud Marketplace-integrated listings are indexed in Data Catalog and Knowledge Catalog, but the catalog cannot specifically filter for that resource type.
Public datasets extend the same model at internet scale. BigQuery public datasets (opens in a new tab) are hosted by Google under projects such as bigquery-public-data, with Google paying for storage and each querier paying only for queries it runs, with the first 1 TB per month free. Subscribers find them in the Google Cloud console Explorer pane, through BigQuery sharing, through the bq command-line tool, or through the BigQuery REST API and client libraries, and must query with a fully qualified name such as bigquery-public-data.bbc_news.fulltext.
A listing is the searchable record for a shared resource, and a complete listing carries the context a subscriber needs to evaluate it. A publisher can specify the resource description, sample queries, sample message data, documentation links, relevant instructions for subscribers, primary contact email address, provider details, and publisher details. Data exchanges also carry a primary contact email address so subscribers can contact the owner directly.
Catalogs add governed metadata on top of that publisher-supplied description:
This combination lets internal teams and external consumers search by business meaning, verify quality and lineage, and enforce purpose and retention policy before subscribing, rather than relying on table names alone.
There is no additional charge for managing data exchanges or listings in BigQuery sharing. Cost-sharing follows resource type, with storage staying with the publisher and consumption billed to the subscriber project:
| Resource | Publisher pays | Subscriber pays |
|---|---|---|
| BigQuery datasets | Data storage in the source project | Queries run against the shared data, using on-demand or capacity pricing |
| Pub/Sub topics | Data written as publish throughput, plus network egress if applicable | Data read as subscribe throughput, plus network egress if applicable |
The same split applies when a dataset is shared with the public. Storage charges are incurred by the billing account attached to the project that contains the publicly shared dataset, while query charges are incurred by the billing account attached to the project where the query jobs run. Because the linked dataset is only a pointer, the subscriber pays for bytes scanned in its own job project even though no data was copied.
Publishers monitor that consumption without seeing subscriber data. Provider usage metrics report jobs that run against the shared dataset, consumption by subscriber project and organization, and total rows and bytes processed. Billing usage metrics for Google Cloud Marketplace (opens in a new tab)-integrated listings are not captured in provider usage metrics or in INFORMATION_SCHEMA views, so commercial publishers track orders through Cloud Marketplace instead.
Exam tip: Storage always bills to the project containing the shared dataset, while queries always bill to the project running the job — Google pays storage only for its own public datasets.
BigQuery separates storage from compute, so sharing many copies does not require more compute until subscribers query. Compute is measured in slots, a unit of capacity that Google manages, and memory is provided by a remote distributed service connected over Google's petabit network. Data is stored compressed, encrypted, replicated, and distributed in Google's distributed file system without consuming query slots.
Subscribers and publishers control query spend by choosing how slots are purchased and how queries are scheduled. On-demand pricing bills per bytes scanned, while capacity-based pricing uses reservations — buckets of dedicated slots that are dynamically created and then assigned to projects, folders, or organizations. Interactive queries execute as soon as possible by default, while batch queries are queued and start when idle capacity is available in the shared pool. Assigning a subscriber project to a reservation therefore caps and isolates the cost of querying published data, while leaving storage costs with the publisher.
Use a standard exchange listing to share curated datasets with governed access, a Pub/Sub topic listing to share real-time streaming events from a publisher-owned topic to subscribers, and a data clean room to collaborate on sensitive data across organizations with joint analysis under shared controls without exchanging raw copies.
VPC Service Controls (VPC SC) encloses trusted publisher and subscriber projects in a perimeter that denies copying or moving data to outside resources even when Identity and Access Management (IAM) permissions would otherwise allow access. Access to a shared asset therefore requires passing both the listing permission check and the perimeter rule.
Storage costs bill to the project containing the shared dataset while query costs bill to the subscriber project running the job, because subscribing creates a read-only linked dataset that is a live pointer without copying data. There is no additional charge for managing data exchanges or listings.
Your enterprise maintains a central BigQuery dataset named source_sales in project corp-analytics-prod that contains detailed order information and customer personally identifiable information (PII). You need to publish a collection of curated analytical views that exclude sensitive PII to an external analytics partner group (partner-analysts@partner.com).
The implementation must satisfy the following requirements:
source_sales directly.source_sales without individual view authorization.Which configuration should you implement?
Create a new dataset named partner_views in the same region as source_sales. Grant roles/bigquery.dataViewer to the partner group on source_sales, and configure dynamic data masking on all PII columns using policy tags.
Create a new dataset named partner_views in the same region as source_sales. Authorize partner_views on the source_sales dataset. Grant roles/bigquery.user to the partner group on the project containing partner_views, and grant roles/bigquery.dataViewer on the partner_views dataset.
Create all analytical views directly inside the source_sales dataset. Apply row-level access policies to the source tables and grant roles/bigquery.dataViewer to the partner group on the source_sales dataset.
Create a new dataset named partner_views in a separate region. Authorize each individual view on the source_sales dataset. Grant roles/bigquery.admin to the partner group on the project containing partner_views.
Last updated