Prepare and test your skills

Prepare and test your skills

Designing streaming ingestion architectures means using Cloud Pub/Sub (Pub/Sub) as a scalable and durable event ingestion service that feeds real-time pipelines built on Cloud Dataflow (Dataflow) (opens in a new tab). In this pattern, publishers send event data into Pub/Sub topics, Dataflow pipelines subscribe to those topics, and Dataflow workers process data in parallel before writing results to sinks. Because Pub/Sub handles ingestion scaling, pipeline design focuses on quotas, flow control, encryption, and residency.
Cloud Pub/Sub is the managed backbone that decouples event producers from streaming processors. Data flows from publishers to a Pub/Sub topic, then from the topic to subscriber pipelines such as Dataflow, so ingestion can continue even when processing speed or downstream systems vary. Using Google Cloud managed sources and sinks removes much capacity-planning work because Pub/Sub provides consistent performance within quotas and limits that fit most requirements. You still must monitor quota consumption in the Google Cloud console and request a quota increase when a single pipeline is expected to exceed per-project quotas.
Scalability of a streaming pipeline also depends on factors outside Pub/Sub and Dataflow code:
Project-level quotas control how much streaming throughput is available to publishers and subscribers. Publishers and subscribers in different Google Cloud projects receive independent data-throughput quotas, so throughput used by one pipeline does not reduce throughput for a pipeline in another project. If multiple pipelines publish or subscribe to a single topic, deploying each pipeline into its own project yields the maximum allowable throughput on that topic. When a single pipeline is expected to exceed per-project quotas, request a quota increase before launch and track consumption in the console.
Exam tip: Pub/Sub throughput quotas are independent per project, so place pipelines that share a topic in separate projects to maximize total throughput on that topic.
Reliability for spikes and failed publishes depends on controlling publish rate and retrying transient failures between publishers and Pub/Sub. To manage transient spikes in message traffic, configure flow control in the publisher settings, which limits the rate of publish requests and avoids errors during bursts. To handle failed publishes, adjust the retry-request variables so transient failures are retried rather than lost. Dataflow itself runs on Compute Engine virtual machine instances, so insufficient Compute Engine quota can also prevent jobs from starting or hinder autoscaling when load increases.
Security and data residency for Pub/Sub messages combine default encryption with customer-controlled keys and storage controls. Cloud Pub/Sub encrypts all messages by default both at rest and in transit using Google-owned and Google-managed encryption keys. For application-layer control, Pub/Sub supports customer-managed encryption keys (CMEKs), and the service depends on Cloud Key Management Service when you need to control the keys. If residency rules require message data to stay in specific locations, configure message storage policies to restrict where Pub/Sub stores message data.
Delivery from subscriptions carries data from a Pub/Sub topic through a subscription to the processing engine or storage sink. Dataflow pipelines read data from Pub/Sub sources and write data to sinks, and they may also call external systems for enrichment, filtering, or business logic within a processing step. As a direct sink example, a Bigtable subscription sends messages from a Pub/Sub subscription to a Cloud Bigtable (Bigtable) table, where Pub/Sub writes each message as a new row. Because Dataflow parallelizes work across workers, batch multiple elements into single requests when calling external services and ensure those services can sustain the load, since autoscaling can otherwise add pressure and exhaust quotas.
Securing and monitoring ingestion pipelines means protecting data as it moves from on-premises, multi-cloud, or Google Cloud sources into services such as BigQuery (opens in a new tab), Cloud Storage, and Pub/Sub, while making every access auditable. Data flows from the source through an ingestion path using Cloud Storage or Pub/Sub, then through a Dataflow pipeline for de-identification, and finally into separate BigQuery warehouses for confidential and non-confidential data. Security controls apply at each boundary, with encryption protecting content, Identity and Access Management (IAM) controlling who can act, network perimeters controlling where data can move, and logging recording what happened.
Encryption and key management for ingestion combine Google-managed default encryption with customer-managed encryption keys (CMEKs) managed in Cloud Key Management Service (Cloud KMS) with Cloud HSM. By default, Cloud Storage encrypts data with Google-owned keys and Pub/Sub encrypts all messages both at rest and in transit, while Pub/Sub and BigQuery also support CMEKs for application-layer control. When CMEKs are used, one CMEK for ingestion is shared by the Dataflow pipeline and Pub/Sub, plus separate CMEKs protect the BigQuery warehouse in the non-confidential project and the warehouse in the confidential project. The CMEK location determines where the key is stored and must be in the same location as the protected resource, and by default the CMEK is rotated every 30 days.
For external ingestion from on-premises or another cloud, client-side encryption adds protection before data leaves the source network. The flow uses envelope encryption with the Tink library, which is compatible with BigQuery Authenticated Encryption with Associated Data (AEAD):
If compliance requires keys to live outside Google Cloud, Cloud External Key Manager (Cloud EKM) can be enabled, but the customer then owns key management activities including rotation. The choice between default encryption, CMEK control, and application-layer tokenization depends on compliance and operational cost:
| Option | Key control | Choose when |
|---|---|---|
| Default encryption at rest | Google-owned and Google-managed keys | No specific key-management requirement exists and a managed service is preferred over operational overhead |
| CMEKs in Cloud KMS with HSM or EKM | Customer-managed lifecycle, with optional FIPS 140-2 Level 3 HSM or external storage | Auditors require proof of key lifecycle control, HSM-backed material, or keys stored outside Google Cloud |
| Application-layer tokenization | Sensitive Data Protection wrapped key plus tokenized values | Analysts must work with data utility without reading raw sensitive fields, such as personally identifiable information (PII) |
Exam tip: Admin Activity audit logs are enabled by default for all services, but Data Access audit logs are enabled by default only for BigQuery and must be explicitly enabled for other ingestion services.
Identity and access control with least privilege means users, groups, and service accounts receive only the no-access, read-only, or write permissions needed for their role. This limit reduces data theft, preserves model and pipeline integrity, and shrinks the surface for accidents or attacks when sensitive data sits in lakes, warehouses, and pipeline staging. Granularity is implemented by mapping IAM roles to identities by project need, access pattern, or resource tags, and by adding IAM Conditions for attribute-based control, such as allowing a service account to trigger a pipeline only when the request originates from a trusted Cloud Build trigger.
Pipeline identities depend on dedicated, least-privilege service accounts rather than broad default accounts. A training or ingestion pipeline service account, for example, has permission to read from only a specific Cloud Storage bucket and to write model artifacts or warehouse tables to a designated destination. Further limits come from principal access boundary (PAB) policies that cap what a principal can access, and from Privileged Access Manager for just-in-time temporary elevation whose activity is later visible in audit logs. Organization policies reinforce this posture by disabling service account creation, disabling service account key creation, and disabling automatic role grants to default service accounts in ingestion projects.
Fine-grained data access in BigQuery depends on policy tags, row-level security, and column-level security layered on dataset IAM roles. Policy tags define a hierarchy where access to a higher tag implies access to lower tags but not the reverse: the 3_Confidential tag covers very sensitive columns such as credit card numbers and also grants 2_Private and 1_Sensitive; the 2_Private tag covers PII such as first name and also grants 1_Sensitive but not 3_Confidential; the 1_Sensitive tag covers non-public data such as credit limit with no access to higher tags. Columns without tags remain available to all users with warehouse access, and analysts need the Fine-Grained Reader role to read protected columns even after re-identification. In Cloud Storage, IAM at bucket and project level is preferred over access control lists (ACLs), with IAM policies also supported on buckets and managed folders.
Network perimeters and secure data movement create a security boundary around Virtual Private Cloud (VPC) resources so data cannot be exfiltrated to the internet or unauthorized networks. VPC Service Controls defines a service perimeter that includes AI, ML, and warehouse resources and sensitive data, with ingress and egress rules controlling data flow across the perimeter. Private Service Connect lets pipelines communicate with Google Cloud APIs using private IP addresses at the API and IP layers, while VPC networks with private IP addresses remove internet exposure and firewall rules deny all traffic by default and explicitly allow only matching criteria.
Ingestion from external networks depends on an encrypted connection plus allowlisted access before any data moves. Cloud VPN or Cloud Interconnect protects all traffic between the external environment and Google Cloud, with Dedicated Interconnect recommended for high-throughput streaming because it provides a direct connection. Access from the external environment is permitted only from allowlisted IP addresses defined in access levels policy rules. Once inside the perimeter, sharing across privacy boundaries uses governed paths such as BigQuery sharing with Analytics Hub and BigQuery data clean rooms rather than open export.
Monitoring, logging, and governance for auditability combine real-time pipeline telemetry with audit trails that record who accessed or changed data and when. Cloud Logging provides visibility into system activity and live tailing of pipeline logs, while Cloud Monitoring tracks key signals and events that can reveal suspicious activity or performance degradation. Admin Activity audit logs record API calls that modify configuration or metadata, and Data Access audit logs track reads of configuration or user-provided data; both can be centralized with log sinks into Observability Analytics for investigation or into Cloud Storage for long-term retention, and log data can be regionalized to meet residency requirements. Sensitive or PII data must not be written into experiment logs or scattered log servers.
Governance and integrity checks depend on Knowledge Catalog (formerly Dataplex) as the organization-wide platform for discovery, lineage, quality, and access. Knowledge Catalog manages table and column-level lineage, data quality checks and data profiles, business glossary vocabulary, and unified governance across BigLake and open formats such as Iceberg and Delta Lake. During ingestion, Sensitive Data Protection discovers, classifies, and de-identifies data using record transformations for structured fields such as credit card numbers and PINs and information types (infoTypes) for unstructured content, with a Dataflow pipeline tokenizing confidential data from Cloud Storage into BigQuery. Security Command Center then detects misconfigurations and malicious activity, with IAM Recommender suggesting least-privilege reductions and Firewall Insights flagging overly permissive rules.
Reliability controls for ingestion sources depend on the storage and messaging guarantees of the source services plus explicit handling of traffic spikes and failed publishes. Cloud Storage buckets can be regional, dual-region, or multi-region, where regional data is replicated synchronously across zones and dual-region or multi-region data is replicated asynchronously across regions for higher availability. BigQuery stores loaded data synchronously in two zones within the specified region so a zone outage does not lose data. Pub/Sub manages transient spikes by configuring flow control in publisher settings to limit publish request rates, and failed publishes are handled by adjusting retry-request variables.
Data residency and message durability further constrain where ingestion data is kept. Cloud Storage stores or replicates data only within the specified regions, Pub/Sub message storage policies restrict message data to specific locations, and Cloud Logging regionalization keeps log data in the specified region. Together these controls let a pipeline owner place compute, keys, data, and logs in the same compliant geography while retaining the redundancy needed for continuous batch and streaming ingestion.
Evaluating bulk and batch data transfer mechanisms means choosing how to move large, existing datasets from on-premises, vendor, or other-cloud sources into Google Cloud without relying on continuous streaming. Transfer Appliance (opens in a new tab) provides offline physical transfer to Cloud Storage and BigQuery, while the BigQuery Data Transfer Service (BQ DTS) provides managed batch transfer from data warehouses directly into BigQuery. Cloud Storage acts as the staging layer for file-based loads into BigQuery when raw files must be uploaded, validated, and then loaded.
Transfer Appliance is an offline, high-capacity device for capturing very large datasets locally and shipping the device to Google for upload. A single appliance can capture 300 terabytes of data in under 25 days, and data can typically be accessed in Cloud Storage within another 10 business days, all without consuming any outbound network bandwidth. Rehydration time depends on data quality, and transfers with very small files take a long time to rehydrate. Choose Transfer Appliance when network bandwidth is limited, outbound costs are high, or data volume makes online transfer impractical.
Data flows from the source environment to the destination through an ordered physical workflow:
This workflow supports three related patterns. Data collection moves distributed inputs into one Cloud Storage or BigQuery location for processing. Data replication copies on-premises data to Google Cloud to test hybrid architectures while existing operations continue. Data migration moves backup images and archives to low-cost durable classes such as Archive Storage for long-term retention and analysis.
The BigQuery Data Transfer Service (BQ DTS) is a managed service that loads batch data from external warehouse and application sources into BigQuery on a one-time or recurring schedule. The service includes a Snowflake connector that can transfer selected tables, automatically detect table schema and data types during transfer, and configure incremental transfer that moves only data changed since the last transfer instead of reloading the full dataset. The broader BigQuery Migration Service extends the same transfer approach to Amazon Redshift, Hadoop, Hive, Apache Spark, IBM Netezza, Oracle and Oracle Exadata, Snowflake, and Teradata, combined with assessment and SQL translation from source dialects to GoogleSQL. Choose BQ DTS when the source is a structured warehouse and the destination is BigQuery tables that must stay current through scheduled batch loads.
For file-based warehouse migration, BigQuery relies on Cloud Storage for staging raw data files. Data flows from the source system to Cloud Storage for upload and download of raw files, and then from Cloud Storage into BigQuery for loading. BigQuery also supports export back to Cloud Storage, so the same bucket path can be used to validate round-trip movement and retain source files.
Selecting by bandwidth, volume, and source location determines whether offline shipment or network-based batch transfer fits the move. Transfer Appliance depends on physical shipment and regional upload location, while BQ DTS depends on network connectivity to the source warehouse and BigQuery destination region. For customers in the European Union, appliances are shipped from Belgium and returned to Belgium for upload, and if the destination Cloud Storage region is within the EU, data never leaves the boundaries of the European Union during any part of the transfer.
| Transfer option | Source to destination | Choose when |
|---|---|---|
| Transfer Appliance | On-premises, vendor, or research sites to Cloud Storage and BigQuery | Volume is hundreds of terabytes, bandwidth is constrained, and offline delay of weeks is acceptable |
| BigQuery Data Transfer Service | Data warehouses such as Snowflake, Redshift, Teradata, and Oracle to BigQuery | Source is structured warehouse tables needing scheduled or incremental batch loads into BigQuery |
| Cloud Storage staging | Raw files to Cloud Storage, then to BigQuery | Files must be staged, inspected, or retained before loading into BigQuery tables |
Exam tip: Transfer Appliance avoids outbound network bandwidth but adds capture plus about 10 business days for upload and rehydration, while BQ DTS uses the network but supports incremental transfers of only changed rows.
Preserving data integrity during transfer means the destination tables in BigQuery match the source in schema, types, and row content after a bulk or batch move. The open-source data validation tool compares source and destination tables after migration to confirm that they match, and the Snowflake connector reduces schema drift by auto-detecting schema and data types at transfer time. For SQL and schema migration, translated queries should be checked with a wide range of test cases across scenarios and data, then run in both Snowflake and BigQuery to compare results and fix differences before cutover. Together, automated validation, schema detection, and result comparison ensure that large offline and batch transfers remain complete and query-ready.
Transfer Appliance is for offline physical transfer of very large datasets from on-premises, vendor, or research sites to Cloud Storage and BigQuery when bandwidth is constrained and weeks of delay is acceptable, capturing 300 terabytes in under 25 days without using outbound network bandwidth with data typically available in Cloud Storage within another 10 business days. BigQuery Data Transfer Service is for managed batch loads from structured warehouses such as Snowflake, Redshift, Teradata, and Oracle into BigQuery on a one-time or recurring schedule with incremental transfer of only data changed since the last transfer.
Cloud Pub/Sub throughput quotas are independent per Google Cloud project, so publishers and subscribers in different projects receive independent data-throughput quotas. Deploying each pipeline that publishes or subscribes to a single topic into its own project yields the maximum allowable throughput on that topic, and quota consumption should be monitored in the Google Cloud console with an increase requested before launch if a single pipeline is expected to exceed per-project quotas.
Transient spikes are managed by configuring flow control in the publisher settings, which limits the rate of publish requests and avoids errors during bursts. Failed publishes are handled by adjusting the retry-request variables so transient failures are retried rather than lost.
A media and analytics organization needs to ingest large volumes (over 150 TiB) of raw video assets and recurring batch exports stored across on-premises POSIX file systems into Google Cloud Storage. The organization has an active high-bandwidth Cloud Interconnect connection and requires a solution that:
Which batch transfer solution should the organization implement?
Deploy Storage Transfer Service on-premises agents organized in an agent pool to transfer data directly to Cloud Storage
Implement custom bash cron scripts using parallel composite uploads via the Google Cloud CLI
Order and configure a Google Cloud Transfer Appliance for scheduled recurring physical capture and shipment
Configure BigQuery Data Transfer Service scheduled recurring jobs targeting on-premises POSIX file systems
Last updated