Prepare and test your skills

Prepare and test your skills

Assess and Plan for New Data Source Integration is the upfront analysis that decides how a new source enters Google Cloud reliably, securely, and compliantly. The assessment profiles the volume, velocity, variety, and schema of the source, then maps that profile to an ingestion pattern and specific Google Cloud services. The same plan defines data quality checks, security controls, and locality rules before the first pipeline is built.
Analysis of volume, velocity, variety, and schema determines service choice, cost, and performance for a new source. Volume sets throughput quotas and storage size, velocity decides between batch files and continuous streams, variety determines how much parsing and normalization is needed, and schema determines whether fields arrive fixed, evolving, or schemaless. Two physical factors also shape performance: data format and location. Formats that support parallel reads such as Avro are usually faster than CSV files with embedded newlines or compressed files that cannot be split, and geographic distance and network topology between sources, pipelines, and sinks affect latency.
External dependencies add another assessment point for pipeline planning. Calling external services from a pipeline adds per-call overhead, and because Dataflow (opens in a new tab) parallelizes work across workers, high fan-out can overwhelm an external system or exhaust its daily or per-second quotas. The supported mitigation is to batch multiple elements into single requests, a behavior built into many Apache Beam I/O transforms such as BigQueryIO and streaming inserts. Autoscaling can make overload worse by adding workers to a slow external-call step, so the plan must confirm that external systems can sustain anticipated load or cap pipeline concurrency.
Mapping source characteristics to ingestion patterns connects each source system to the right Google Cloud entry point. Pub/Sub (opens in a new tab) acts as the scalable entry point for streaming events, Cloud Storage (opens in a new tab) acts as the durable entry point for batch files, Cloud Data Fusion (opens in a new tab) provides code-free database ingestion through connectors, and Dataflow provides programmable batch and streaming transformation. A staged retail pattern shows how they compose: events flow from the source system to Pub/Sub topics, then a Dataflow streaming pipeline writes raw events to BigQuery raw tables, then an hourly batch pipeline transforms them into curated tables for import into the serving system.
For operational and security telemetry, the same decision appears as four gateway paths into the ingestion service. Direct ingestion pulls standard Google Cloud logs from the organization in real time and is the most cost-effective path for high-volume logs such as VPC Flow, DNS, and Firewall. An agent path uses the Bindplane agent (opens in a new tab) telemetry pipeline to collect, refine, and export logs from on-premises Windows or Linux servers or to filter cloud data before ingestion. Data feeds handle cloud logs already aggregated in object stores such as Cloud Storage or Amazon S3, push methods such as webhook, and predefined API integrations, with support for log lines up to 4 MB. Custom API ingestion serves high-volume or home-grown applications that do not fit the other methods but is more complex to operate.
| Ingestion entry point | Use when | Key relationship and tradeoff |
|---|---|---|
| Pub/Sub streaming | Velocity is continuous and bursty, with 10 to 20 times surges during peak sales | Data flows from publisher to topic to subscriber; separate subscriptions let replica, test, and production pipelines pull independently, but throughput quotas are per project |
| Cloud Storage batch | Volume arrives as files for hourly or bulk processing | Data flows from source files to ingestion bucket to batch job; multi-region buckets improve availability, but locality rules may forbid them |
| Cloud Data Fusion | Variety comes from databases needing visual integration without code | Pipelines are built as a directed acyclic graph (DAG) in the UI and the planner converts the DAG into parallel Apache Spark computations; Java Database Connectivity (JDBC) drivers and prebuilt plugins cover many sources, with custom plugins when none exists |
| Dataflow with Apache Beam | Logic needs unified batch and streaming transforms with windowing and session analysis | Code written with the Apache Beam software development kit (SDK) runs on the Dataflow service; serverless scaling removes cluster management, but sources, sinks, and temporary files must be placed to avoid unwanted cross-region movement |
Choose streaming with Pub/Sub and Dataflow when latency into training or serving must be minutes, and choose batch through Cloud Storage and scheduled pipelines when efficiency over large historical volumes matters more. Choose Cloud Data Fusion when the integration is source-to-sink mapping that benefits from a graphical interface and reusable source, transform, and sink plugins. Choose a custom API path only when volume, format, or ownership prevents use of the managed entry points.
Design for data quality and reliability places filter, transform, and redact controls before parsing and storage so only usable, safe data moves downstream. Filter reduces noise and cost by ingesting only relevant events, Transform modifies formats, parses fields, and enriches logs for usability, and Redact masks or removes sensitive values before storage. Common pre-ingestion tasks include removing empty key-value pairs, adding ingestion labels from raw content to identify the source stream, and filtering high-volume endpoint data by field values or category.
A reliable batch pattern validates at each stage and isolates failures for debugging. The documented multi-stage flow preserves order and dependencies:
Reliability also depends on buffering and retry. A Pub/Sub subscription stores unacknowledged messages for up to 7 days, so pipelines can stop and later process backed-up events with low recovery point objective when delayed data is acceptable. For file ingestion, the source system should implement a retry strategy against Cloud Storage durability so failed writes resume with little to no loss, and gcloud storage rsync can synchronize data to another location when replication alone is insufficient.
Security, locality, and compliance assessment defines encryption, access separation, and data residency before pipeline construction. Data is encrypted in transit during retrieval, encrypted at rest by default, and can use customer-managed encryption keys (CMEK) managed by Cloud Key Management Service (Cloud KMS) or customer-supplied encryption keys (CSEK) where locality rules permit broader placement. Access control separates operational control, such as running Dataflow jobs, from data access control, and cross-project ingestion requires explicit Identity and Access Management (IAM) grants such as BigQuery Job User and BigQuery Data Editor on the service account. Privacy requires redacting personally identifiable information (PII) such as email or home addresses and using secure anonymous identifiers, because imported permissions and source access controls may not be enforced downstream.
Locality rules decide whether data at rest, data in motion, and processing can leave a region. If no locality restriction applies, publishing to the global Pub/Sub endpoint provides the highest availability from any Google Cloud location. If messages must stay in place even after encryption, the Pub/Sub topic needs a message storage policy restricted to approved regions, which preserves residency but reduces availability. Dataflow jobs can be constrained with regional endpoint, worker region, and worker zone settings so workers deploy and job metadata stays in one region, while BigQuery datasets must be created as regional or multi-region locations at creation time.
Exam tip: A BigQuery multi-region location does not provide cross-region replication or regional redundancy; data is stored in a single region within that geographic area, so disaster recovery must plan for machine, zonal, and regional failure domains separately.
Implement Data Ingestion Patterns and Services is the configuration and deployment of the right movement model and Google Cloud service for each new source. Batch ingestion moves bounded sets of files or table snapshots on a schedule, streaming ingestion moves unbounded events continuously for low latency, and change data capture (CDC) replicates row-level inserts, updates, and deletes from operational databases. On Google Cloud, Pub/Sub buffers event streams, Dataflow processes batch and streaming data with one programming model, Cloud Data Fusion builds visual integration pipelines, Datastream captures database changes, and Cloud Storage stages batch files for downstream processing.
Batch, streaming, and CDC ingestion patterns differ by latency target, source capability, and how the destination stays current. Batch ingestion fits sources that can export files, snapshots, or query results hourly or daily and destinations that tolerate delayed freshness. Streaming ingestion fits sources that emit events continuously and use cases such as dashboards, real-time machine learning (ML), sensor processing, and log processing that need seconds-level freshness. CDC ingestion fits relational sources where the pipeline must mirror every change without repeated full extracts, supporting low-downtime migration, hybrid-cloud replication, and event-driven consumption from continuously updated tables.
| Pattern | Latency and source requirement | Choose when |
|---|---|---|
| Batch ingestion | Scheduled extracts from files, exports, or queries; BigQuery tables or Cloud Storage objects updated in intervals | Volume is large, source cannot stream, and hourly or daily freshness meets the requirement |
| Streaming ingestion | Continuous events from Pub/Sub (opens in a new tab); Dataflow streaming pipeline with windowing and session analysis | Fluctuating real-time volume needs low latency and exactly-once or at-least-once processing |
| Change data capture (CDC) | Database logs replicated by Datastream; changes merged continuously with UPSERT semantics | Destination tables in BigQuery, Cloud SQL, or Spanner must stay synchronized with the source database |
The staged batch reference architecture shows how the patterns compose: Pub/Sub receives raw events, a Dataflow streaming pipeline writes raw events into BigQuery raw tables, an hourly orchestrated Dataflow batch job transforms them into curated tables, and a validated view is imported into the serving system.
Pub/Sub as the scalable ingestion front end is the durable messaging layer that decouples new sources from processing pipelines. Publishers send messages to a predefined Pub/Sub topic through a Cloud Function, the Pub/Sub API, or manually with the Google Cloud CLI, and subscribers pull independently from their own subscriptions. A common integration pattern installs a lightweight agent on each virtual machine (VM); the agent listens to one or more Pub/Sub topics, pulls each message, starts a pipeline in third-party software, waits for completion, and then retrieves the next message.
Pub/Sub ingestion controls location, durability, and throughput. Without locality restrictions, publishers use the global Pub/Sub endpoint that is accessible from any Google Cloud location. When encryption satisfies locality rules, Pub/Sub with customer-managed encryption keys (CMEK) preserves high availability while using Cloud KMS keys instead of Google-owned keys. When messages must stay in specific places even after encryption, the topic message storage policy restricts persistence to chosen Google Cloud regions, with reduced availability as the tradeoff. A Pub/Sub subscription stores unacknowledged messages for up to 7 days without a message-count restriction, so pipelines can buffer delayed data during an outage and replay backed-up events with low recovery point objective (RPO) after recovery. Throughput quotas apply at the project level, so pipelines in different projects using different service accounts receive independent publisher and subscriber throughput, and multiple pipelines can read the same topic through separate subscriptions for independent pull and acknowledge, replica pipelines for high availability, and isolated test pipelines.
Dataflow for unified batch and stream processing is the fully managed service for running Apache Beam (opens in a new tab) pipelines at scale for both batch and streaming with the same programming model. Apache Beam provides windowing and session-analysis primitives plus source and sink connectors, including a connector for BigQuery, to transform and enrich data in stream and batch modes with equal expressiveness. Dataflow allocates worker VMs automatically, autoscales workers up or down, dynamically rebalances work among VMs, and deletes VMs when the job completes or is cancelled, so teams focus on pipeline code rather than clusters. By default Dataflow provides exactly-once processing of every record, and streaming pipelines that can tolerate duplicates can enable at-least-once mode to reduce cost and improve latency.
Exam tip: Dataflow uses exactly-once processing by default; enable at-least-once mode only when the streaming pipeline can tolerate duplicates in exchange for lower cost and latency.
Dataflow ingestion depends on where sources, sinks, temporary files, workers, and metadata reside. Dataflow supports code written with the Apache Beam Java, Python, and Go SDKs, deployment through Dataflow templates including Google-provided templates, and iterative development in JupyterLab notebooks. Jobs are submitted through the command-line interface or language SDKs and monitored through the Dataflow monitoring interface, which shows pipeline stages, progress, and execution details. For locality control, the regional endpoint, worker region, and worker zone parameters control where workers deploy and where job metadata is stored; if sources, sinks, or temporary files sit outside the job region, data flows across regions. Pipelines can also run on other Beam runners, such as a backup pipeline on an on-premises Spark cluster with the Apache Spark Runner, with operation support checked in the Beam Capability Matrix. Dataflow supports CMEK to encrypt pipeline state and to access Cloud KMS-protected sources and sinks, which can open additional regions when encryption mitigates locality restrictions. Calling external services from a pipeline adds per-call overhead and quota risk, so batching elements into fewer requests and limiting concurrent calls protects both Dataflow throughput and the external system.
Cloud Data Fusion for visual pipeline development is the fully managed data integration service, built on the open source CDAP project, for building pipelines through a graphical interface without writing code. Developers connect sources to transformations, sinks, and other nodes in the Cloud Data Fusion (opens in a new tab) UI to form a directed acyclic graph (DAG). When the pipeline deploys, the Cloud Data Fusion planner transforms the DAG into parallel computations that execute as an Apache Spark job on Managed Service for Apache Spark.
Cloud Data Fusion connects to new relational sources with Java Database Connectivity (JDBC) drivers that are uploaded to the instance and configured for use in pipelines, then reads, transforms, and loads data into destinations such as BigQuery. Prebuilt plugins cover sources, transforms, aggregates, sinks, error collectors, alert publishers, actions, and post-run actions, and missing connectors can be built with the Cloud Data Fusion plugin APIs. The same service creates both batch and streaming pipelines and exposes logs and metrics, so administrators can operationalize workflows without custom tooling. Choose Cloud Data Fusion when rewriting deprecated or impractical legacy pipelines into maintainable managed pipelines matters more than hand-coding every transform.
Change data capture with Datastream is the CDC replication service that streams source database changes into Google Cloud destinations for dashboards, replication, migration, and event-driven architectures. Datastream integrates directly with BigQuery through the BigQuery Write API, writing change events into the dataset where changes merge continuously with existing data as UPSERT operations. Datastream also writes change streams to Cloud Storage as a destination, and Dataflow templates built for Datastream-generated files read from Cloud Storage and load replicated tables into BigQuery, Cloud SQL for PostgreSQL, or Spanner for low-downtime migration and hybrid-cloud configurations. The Datastream-to-BigQuery Dataflow template uses the streaming inserts API, so there is no data manipulation language (DML) operation limit, although BigQuery streaming-insert quotas still apply.
Datastream protects data in transit and at rest and limits scope to required data elements. Buffered data is encrypted at rest, replicated data inherits BigQuery or Cloud Storage (opens in a new tab) security controls, and stream definitions select only the schemas, tables, and columns to replicate while excluding sensitive elements. Source connectivity follows three options:
Batch staging and orchestration through Cloud Storage is the file-based staging layer before orchestration and processing. Locality starts with bucket choice: multi-region or dual-region location types replicate data at rest across Google Cloud regions for availability during a regional outage, while customer-managed encryption keys (CMEK) or customer-supplied encryption keys (CSEK) permit additional regions when key management satisfies locality rules. When neither location types nor key management are permitted, the gcloud storage rsync command synchronizes data to another location such as on-premises storage or another cloud provider. Processed lake data is commonly stored in columnar formats such as Parquet and ORC for efficient storage and faster analytical access, with database, table, column, and partition metadata in Dataproc Metastore.
Reliability for Cloud Storage ingestion combines retry, copies, and orchestrated reprocessing. A point-of-sale (POS) or other file producer uses a retry strategy when writes fail, and Cloud Storage durability lets ingestion and downstream processing resume with little to no loss. Copies in multi-region or dual-region buckets or synchronized copies in another location increase availability of unprocessed files. Orchestration with Managed Airflow validates new files in the ingestion bucket, starts an ephemeral Managed Service for Apache Spark cluster, runs the Spark extract-transform-load (ETL) job, and deletes the cluster, with DAG files stored in Cloud Storage under the same locality considerations. Because batch jobs can be recreated and restarted, disaster recovery focuses on recovering ingested files, processed lake data, and lake metadata.
A complete hourly batch flow moves data through an ordered sequence:
Ensure Data Reliability and Operational Integrity is the practice of adding new sources without losing data, corrupting data, or causing silent failures in production. In Google Cloud, Cloud Dataflow runs pipeline stages in parallel across multiple workers, while Cloud Monitoring tracks key signals and events and Cloud Logging provides visibility into system activity to detect anomalies and malicious activity. Reliability comes from combining that observability with validation checks, controlled calls to external systems, resilient managed sinks, and safe promotion of code from testing to production.
Monitor pipeline health with Cloud Monitoring and Cloud Logging uses signals plus retained evidence for alerting and audit. Cloud Logging records API activity through audit logs, where Admin Activity audit logs are enabled by default for all Google Cloud services used in the architecture and Data Access audit logs are enabled by default for BigQuery and can be enabled for other services. Data Access logs track API calls that read configuration or metadata and user requests that create, modify, or read user-provided data, so the audit trail flows from the service to Cloud Logging to the operator reviewing access. For hybrid operations, Cloud Logging can export large volumes of logs in real time through log sinks to Pub/Sub (opens in a new tab), from which partner services such as Elastic, Splunk, and Datadog ingest the stream, allowing Datadog to act as a single pane of glass for metrics while the original logs remain available in Cloud Logging for troubleshooting.
Validate data completeness and quality for new sources means checking format, range, and distribution before data is used for analytics or training, so poisoned, biased, or malformed records do not propagate downstream. Knowledge Catalog (opens in a new tab) provides automatic data quality capabilities that verify those properties centrally, while anomaly detection in BigQuery uses statistical methods or machine learning models to flag training-data anomalies that can indicate data poisoning. Sensitive Data Protection (opens in a new tab) adds discovery, classification, and de-identification for sensitive fields in sources such as Cloud Storage, preserving utility through techniques like pseudonymization and bucketing. Together the flow runs from the source to validation checks to the governed lake or warehouse, with lineage, data profiles, and access logs maintained in Knowledge Catalog to audit transformations and detect unauthorized access.
Handle errors from external systems and managed sinks accounts for limits outside pipeline code, because external systems can set the upper bound on scalability and throughput. Three outside factors shape whether a Dataflow job stays reliable when a new source or sink is integrated:
Calls from the pipeline to external services add per-call overhead and are subject to daily quotas and per-second rate limits. Many native Apache Beam I/O transforms, including BigQueryIO and streaming inserts, already batch multiple elements into single requests to reduce that overhead. Because Dataflow parallelizes work and autoscaling can add workers to a slow external-call step, added workers can further overwhelm the external service, so the pipeline must either ensure the external system supports the anticipated load or limit batch sizes and concurrent calls to sustainable levels. For Pub/Sub sources, publisher flow control limits the rate of publish requests during transient spikes, and retry-request settings control how failed publishes are retried before they become data loss.
Exam tip: Pub/Sub throughput quotas operate at the project level with independent quotas for publishers and subscribers in different projects, so deploy each high-throughput pipeline in its own project to get maximum allowable throughput on a shared topic.
Deploy reliably with continuous integration and safe updates ensures only tested code reaches production when a new source is added. Test automation runs the test suite on each commit, often through a build tool such as Maven, and code that passes unit and integration tests is packaged into deployment artifacts known as a passing build. For the Apache Beam Java SDK the artifact is a self-executing JAR file stored in a Cloud Storage bucket in the deployment project, while Classic Templates add a JSON template file and optional metadata template. The promotion sequence preserves order and isolation between environments:
Streaming pipelines are harder to automate because the operator must decide how to replace or update the running job. When an in-place update is not possible or not desired, the documented alternative is coordinating multiple Dataflow jobs in parallel so the new pipeline with the new source takes over while business disruption is minimized.
Build on resilient storage and quota foundations means Dataflow reliability depends on the Compute Engine quota and managed sinks beneath it. Dataflow (opens in a new tab) jobs run on Compute Engine virtual machine (VM) instances and write to managed sinks, and Dataflow itself imposes quotas and limits. Insufficient Compute Engine quota prevents jobs from starting or hinders autoscaling when a new source increases load. Using Google Cloud managed sources and sinks removes much capacity planning by providing built-in scalability, but Pub/Sub and BigQuery quotas still influence design and must be viewed in the console and increased when a single pipeline exceeds per-project limits.
| Product | How reliability is provided | What failure it handles |
|---|---|---|
| BigQuery | Data loaded into BigQuery is stored synchronously in two zones within the specified region | Zone outage without data loss, with column-level security and encryption protecting content |
| Cloud Storage | Regional buckets replicate synchronously across multiple zones; dual-region and multi-region buckets replicate asynchronously across regions | Zone outage for regional buckets, region outage for higher-availability bucket types |
| Pub/Sub | Scalable and durable event ingestion with publisher flow control and retry-request controls | Transient spikes in message traffic and failed publishes without dropping events |
| AlloyDB for PostgreSQL | High availability cluster with redundant primary nodes in two zones and automatic failover, plus cross-region replication option | Zone outage by failover, region outage by cross-region replica |
This foundation means data flows from the new source through Dataflow workers to a sink that already survives zone failure, while Cloud Logging retains regionalized log data and Admin Activity and Data Access logs to prove completeness and support timely alerting when integration fails.
Choose Pub/Sub with Dataflow streaming when latency into training or serving must be minutes, and choose Cloud Storage with scheduled pipelines when efficiency over large historical volumes matters more. Choose Cloud Data Fusion when the integration is source-to-sink mapping that benefits from a graphical interface and reusable plugins, and choose a custom API path only when volume, format, or ownership prevents use of the managed entry points.
A Pub/Sub subscription stores unacknowledged messages for up to 7 days without a message-count restriction. Pipelines can therefore stop during an outage and later process backed-up events with low recovery point objective when delayed data is acceptable.
Datastream streams source database changes into Google Cloud and integrates directly with BigQuery through the BigQuery Write API, where changes merge continuously with existing data as UPSERT operations. Datastream can also write change streams to Cloud Storage for Dataflow templates that load replicated tables into BigQuery, Cloud SQL for PostgreSQL, or Spanner.
An enterprise financial organization is designing an ingestion pipeline to integrate continuous, high-volume transactional logs from an on-premises database into a secured BigQuery data warehouse.
The technical, analytical, and compliance requirements are as follows:
Which ingestion and security design should the data engineering team implement?
Deploy an Apache Sqoop cluster on Cloud Dataproc over Dedicated Interconnect; batch load relational data directly into BigQuery; apply column-level encryption using Cloud KMS software keys; configure IAM table-level permissions to restrict unauthorized analyst access.
Stream records over public HTTPS endpoints to Cloud Run functions; tokenize sensitive identifiers irreversibly using cryptographic hashing; write files into Cloud Storage using BigLake tables; apply BigQuery Storage Read API ACLs to govern field access.
Establish an IPsec Cloud VPN tunnel; ingest raw plaintext transaction records into Cloud Storage; schedule a Sensitive Data Protection (DLP) de-identification inspection job to rewrite objects using customer-supplied encryption keys (CSEK); load the output into BigQuery tables with row-level security policies.
Establish a Dedicated Interconnect connection; encrypt sensitive fields on-premises using the Tink library with Cloud HSM-wrapped keys; ingest the encrypted columns and wrapped keys into BigQuery; configure policy tags with dynamic data masking and grant the Fine-Grained Reader role to authorized investigators to use BigQuery AEAD decryption SQL functions.
Last updated