professional-cloud-data-engineer
Prepare and test your skills
Prepare and test your skills
A three-step process flow showing the BigQuery Analytics Hub data sharing lifecycle: an administrator creates a data exchange, a publisher creates a listing within it, and a subscriber subscribes to create a read-only linked dataset. A dashed feedback loop shows that publisher updates to data or schema are automatically reflected in the subscriber's linked dataset with zero-copy sharing.
A publisher project shares a BigQuery dataset by publishing a listing in a BigQuery sharing (Analytics Hub) data exchange; a subscriber subscribes and receives a read-only linked dataset that queries the publisher's data in place, with no data copied. The publisher pays for storage while the subscriber pays for query compute, and both audit usage via Cloud Logging and INFORMATION_SCHEMA.SHARED_DATASET_USAGE.
In BigQuery Analytics Hub, a data publisher is the organization that owns and shares datasets, while a data subscriber is the organization that consumes the shared data. The publisher incurs costs for data storage, and the subscriber is charged for the computational resources used to query the data.
An authorized view allows a publisher to share only a filtered subset of a dataset without granting direct access to the underlying source tables. Subscribers can query the authorized view, but this mechanism is ideal for implementing row-level or column-level security restrictions.
A linked dataset is a read-only dataset in a subscriber's project that points directly to the publisher's source data without copying it. It contains dynamic views that map to Data Lake Objects (DLO), Data Model Objects (DMO), or Calculated Insights Objects (CIO) from the publisher.
The zero-copy architecture creates a clear financial separation where the data publisher pays for storing the data in BigQuery, and the data subscriber pays for the computational resources used to query the linked dataset. Subscriber queries are billed under either on-demand pricing or a capacity-based model.
BigQuery Analytics Hub provides a secure platform for sharing data across organizations. It connects data publishers, who own and share datasets, with data subscribers, who consume that data. The service enforces strong security and governance policies to protect data throughout the sharing lifecycle.
Identity and Access Management (IAM) controls who can perform actions on shared data. Analytics Hub uses specific, granular IAM roles to enforce the principle of least privilege. Exchange administrators manage the overall data exchange. Publishers are responsible for publishing data listings. Subscribers have the permissions needed to consume shared data. Using these predefined roles is more secure than granting broad, basic roles.
An authorized view is a powerful tool for sharing only a specific part of a dataset. The publisher creates a view that filters the data, then authorizes specific users or groups to access that view. Subscribers can query the authorized view, but they cannot directly access the underlying source tables. This mechanism is ideal for implementing row-level or column-level security restrictions.
These features provide fine-grained control over data visibility within a shared dataset. Column-level security uses policy tags to mark sensitive columns. Only users granted the Fine-Grained Reader role can see data in these protected columns. Row-level security adds filters so users only see rows of data they are authorized to see, based on their identity or other conditions. These controls can be applied directly to shared tables or combined with authorized views for layered security.
VPC Service Controls create a security perimeter around Google Cloud resources, preventing data from being copied or accessed outside defined boundaries. Publishers can use them to isolate projects containing sensitive data. Perimeter bridges can be configured to allow controlled data flow between specific projects, which is essential for secure sharing. All data is encrypted at rest and in transit. Publishers can choose to use Google-managed encryption keys or bring their own customer-managed encryption keys (CMEK) for greater control.
Exam tip: Authorized views allow sharing a filtered subset of data without granting direct access to the source tables, making them a key tool for implementing row- or column-level security in a sharing context.
BigQuery Analytics Hub facilitates data collaboration by letting organizations create structured marketplaces for data. A data exchange is a collection of data listings. Publishers can create private exchanges for internal use or public exchanges for broader sharing. Subscribers browse listings and, upon subscribing, gain access to a linked dataset in their own project.
A linked dataset is a read-only dataset in the subscriber's project that points directly to the publisher's source data; no physical data is copied. The linked dataset contains dynamic views that map to different types of objects in the publisher's project:
This structure ensures all security and governance policies are enforced at the publisher's source.
For data stored outside of Google Cloud, BigQuery Omni allows querying data residing in other cloud providers' storage. To improve performance for remote data, subscribers can create materialized view replicas, which are local, refreshed copies of the external data. Architects must also plan for regional availability. While BigQuery automatically replicates data across zones within a region, creating a cross-region copy for disaster recovery or data residency requires a manual process.
The sharing workflow follows a specific order. First, an administrator evaluates organizational needs and creates a data exchange. Next, a publisher with the correct IAM role creates a structured listing within that exchange. Finally, a subscriber discovers the listing and subscribes, which automatically provisions the linked dataset in their project. The linked dataset remains synchronized with the source; if the publisher updates the underlying data or schema, the subscriber's view reflects those changes.
Analytics Hub uses a zero-copy architecture, meaning the publisher's physical data is never duplicated for sharing. This separation of storage and compute has direct implications for cost and performance optimization for both parties in the sharing relationship.
The zero-copy model creates a clear financial separation. The data publisher incurs costs for storing the data in BigQuery. The data subscriber is charged for the computational resources used to query the linked dataset. Subscriber queries are billed under either the on-demand pricing model (per TB scanned) or a capacity-based model (using BigQuery slots).
Both publishers and subscribers can take steps to optimize query performance and control costs.
CREATE TABLE AS SELECT that would move data out of BigQuery, ensuring query execution (and its associated costs) stay within the platform.Tracking usage is essential for governance and cost analysis. Publishers can view usage metrics for their shared listings, including details on jobs run by subscribers and bytes processed per project. For detailed audit trails, both parties should use:
INFORMATION_SCHEMA.SHARED_DATASET_USAGE view, which provides specific insights into queried resources and bytes processed by subscribers.Integrating with Data Catalog allows for metadata management and tracking the lineage of shared data assets, completing the governance picture.
INFORMATION_SCHEMA.SHARED_DATASET_USAGE view to audit query activity and monitor data consumption patterns.A multinational financial services enterprise wants to share curated market analytics datasets with external corporate partners using BigQuery sharing (Analytics Hub).
The enterprise has established the following technical and governance requirements:
How should the data engineer configure the Analytics Hub environment?