professional-cloud-data-engineer
Log routing directs operational and audit logs from data services to storage and analysis destinations using the Cloud Logging Log Router. The Log Router uses sinks, which are rules that filter logs by criteria like service or severity, to forward entries to three main destinations. Logs can be sent to Cloud Storage for long-term archival, to BigQuery for SQL-based analysis, or to Pub/Sub for real-time streaming to external systems. To allow this forwarding, administrators must grant the Log Router's service account the necessary IAM permissions on the destination resources. Exclusion filters can be added to sinks to discard high-volume, low-value logs, reducing transfer and storage costs.
Log retention policies define how long log data is kept before automatic deletion. Cloud Logging applies different default retention periods based on log type; for example, Admin Activity audit logs are retained for 400 days, while Data Access audit logs have shorter defaults. When logs are routed to Cloud Storage, object lifecycle management rules can be used to move older logs to cheaper storage classes or delete them. For logs in BigQuery, retention is controlled by setting partition and table expiration schedules at the dataset level. Cloud Audit Logs capture security-relevant events and should be routed to immutable storage, like a locked Cloud Storage bucket, to prevent tampering.
Exam tip: Cloud Logging retains Admin Activity audit logs for 400 days by default, whereas Data Access audit logs have shorter default retention periods and must be explicitly enabled to capture data read and write events.
BigQuery query performance depends on the consumption of slots, which are virtual compute units. Administrators monitor slot consumption and query queues to prevent performance issues. The BigQuery admin panel and Cloud Monitoring provide charts for metrics like job concurrency and queue depth. When incoming queries exceed concurrency limits, they are placed in a queue. If a queued query is not started within a system timeout, it is automatically cancelled.
Excessive queue lengths indicate slot contention, which may require increasing compute capacity or optimizing SQL queries.
Slot reservations allocate dedicated processing power to isolate critical workloads from shared resource pools. The ability to manage this capacity varies across pricing models and editions:
| Pricing model / Edition | Maximum concurrency target support | Workload management capability |
|---|---|---|
| On-demand | Not supported | Queries run in a shared, multi-tenant slot pool without dedicated limits. |
| Standard edition | Not supported | Provides baseline dedicated slot reservations without concurrency targets. |
| Enterprise edition | Supported | Provides advanced concurrency controls to optimize slot sharing and prevent workload starvation. |
Choosing Enterprise edition allows administrators to set a maximum concurrency target, ensuring high-priority workloads maintain predictable performance during peak times.
Observability for data systems relies on collecting and visualizing three types of telemetry data: metrics (numeric measurements like CPU use), logs (time-stamped event records), and traces (latency maps for distributed requests). Cloud Monitoring uses these signals to track the four golden signals: latency, traffic, errors, and saturation. Real-time dashboards visualize these metrics for services like Cloud Dataflow, BigQuery, and Google Kubernetes Engine (GKE), providing immediate visibility into pipeline health.
Proactive alerting policies notify teams of pipeline degradation before complete failures occur. Engineers write Monitoring Query Language (MQL) queries to create multi-condition alerts that correlate different operational signals, such as rising Pub/Sub backlog alongside high Dataflow worker CPU. This approach reduces false alarms while enforcing reliability targets tied to Service Level Objectives (SLOs). Effective monitoring for data pipelines should watch specific indicators:
When alert conditions are met, notifications are routed to channels like email, Slack, or Pub/Sub to trigger automated recovery workflows.
Exam tip: Multi-condition alerting policies written in Monitoring Query Language (MQL) correlate multiple operational signals—such as rising Pub/Sub message age alongside high Dataflow worker CPU utilization—to identify true pipeline degradation while reducing false alarms.
Project quotas are adjustable limits on resource consumption set by Google Cloud to ensure fair usage and system stability. Service limits are fixed constraints that cannot be changed. Proactive monitoring of these limits is a core part of capacity planning to prevent operational bottlenecks in services like BigQuery, Dataflow, and Dataproc.
You monitor quota usage with Cloud Monitoring, which provides metrics and dashboards to visualize consumption trends. Using the Metrics Explorer, you can view specific quota metrics like quota/usage and quota/limit, filtered by service and limit name. You can create custom charts and dashboards to track usage over time and set up alerting policies to receive notifications when usage approaches a limit. This proactive monitoring helps identify trends and potential shortages before they impact data pipelines.
When forecasted usage indicates a potential shortfall, you can manually request a quota increase via the Google Cloud console's IAM & Admin > Quotas page. For more automated management, you can enable the quota adjuster in Capacity Planner (currently in preview). This tool monitors resource consumption and proactively submits quota increase requests on your behalf when usage nears a limit. For planned large-scale needs, Capacity Planner also lets you view historical and forecasted usage for resources and create reservations to secure resources in advance for known peak periods.
Each major data service has its own quota structure that must be managed individually. BigQuery has quotas on concurrent jobs and slot utilization. Dataflow enforces limits like a maximum of 25 concurrent jobs per project. Dataproc quotas are applied at the project and region level for API operations and cluster counts, and they depend on underlying Compute Engine quotas for resources like CPUs. A best practice is to regularly review these quotas in the context of pipeline growth and perform load testing to validate capacity estimates.
Exam tip: Service limits are fixed constraints that cannot be changed, while project quotas can be adjusted by requesting an increase.
Error message interpretation involves analyzing diagnostic output from Google Cloud services to determine if a problem is temporary (transient) or indicates a deeper issue (systemic), then taking corrective action. Data workloads generate errors from multiple sources: Cloud Logging stores log entries from services like Dataproc and Dataflow; Cloud Monitoring provides metrics and alerts when thresholds are exceeded; and job execution logs contain details about pipeline failures and resource constraints. For example, Dataproc cluster errors often include RESOURCE_EXHAUSTED errors from stockouts or initialization action failures, which appear in Cloud Logging.
Network configuration problems are a common cause of cluster creation and job execution failures. When troubleshooting, verify that the VPC network and subnet exist and are properly configured. Ensure Private Google Access is enabled on the subnet if cluster VMs need to reach Google APIs, and that firewall rules allow internal communication and outbound traffic. You can test connectivity by launching a temporary Compute Engine VM in the cluster subnet and using tools like curl and nslookup to verify network paths to Google APIs.
Resource quotas are limits that, when exceeded, can cause cluster creation or job execution to fail. Common quotas to monitor include regional CPUs, disk storage, IP addresses, and Dataproc API request rates. To troubleshoot, review your quotas in the Google Cloud console, filter for services like "Compute Engine API," and identify any quotas at or near their limits. For persistent issues, you may need to request a quota increase. Tools like gcpdiag can help diagnose cluster creation issues related to stockouts, insufficient quota, or network misconfiguration.
Billing anomalies are unexpected spikes in Google Cloud usage costs. You investigate these using the Cloud Billing Reports page, grouping data by project, service, or SKU to pinpoint the source. A key practice for cost attribution is using labels to categorize resources (e.g., department:finance); you can then filter billing reports by these labels to see costs broken down by team or application. Exporting detailed billing data to BigQuery enables advanced custom analysis, such as SQL queries to track cost trends.
To prevent surprises, create budgets scoped to a billing account, specific projects, or labeled resources. Configure alert threshold rules (e.g., 50%, 90%, and 100% of budget) that trigger email notifications or programmatic Pub/Sub notifications. These notifications can feed into automated workflows that might disable billing on a project if costs exceed a critical threshold.
Exam tip: Having sufficient quota does not guarantee actual resource availability. If zonal or regional resources are depleted, workloads may still fail.
Configuring and monitoring data processing jobs involves setting execution parameters, implementing monitoring, and troubleshooting to ensure performance and reliability for services like Dataflow, Dataproc, and Cloud Composer. For Dataflow, you configure pipelines using the Apache Beam SDK, specifying machine type, disk size, and autoscaling. In Dataproc, you set cluster properties and job submission parameters to optimize Spark performance. Cloud Composer requires configuring the Airflow environment, including worker CPU and memory limits.
You monitor jobs using Cloud Monitoring and Cloud Logging. For Dataflow, create dashboards with metrics like system lag and set alerting policies. In Dataproc, use the monitoring interface to track cluster metrics and job status. For Cloud Composer, check the Monitoring Dashboard for environment health and review Airflow logs. When jobs fail, diagnose issues by examining logs for common problems like resource exhaustion, job failures, or performance bottlenecks such as high shuffle times in Spark.
Compute capacity management involves allocating and optimizing resources like reservations and commitments to meet workload demands while controlling costs. Reservations provide guaranteed compute capacity in specific zones. In BigQuery, reservations create isolated pools of slots that can be allocated to different projects or teams, preventing workloads from competing for capacity. Reservations can be combined with committed use discounts (CUDs) for discounted pricing on predictable, steady-state workloads.
Autoscaling dynamically adjusts resources based on demand. BigQuery offers autoscaling reservations that scale slot capacity within set limits. For containerized workloads, GKE provides the cluster autoscaler for nodes and the Horizontal Pod Autoscaler (HPA) for pods. Cloud Run automatically scales container instances and can scale to zero when there are no requests. Cost optimization involves matching workload characteristics to the right model: Spot VMs offer large discounts for fault-tolerant batch jobs, while commitments are best for stable 24x7 workloads.
Optimizing BigQuery query performance and cost involves using native capabilities like dry run mode to estimate query size without incurring costs and leveraging cached query results to avoid recomputing data. To manage high-volume queries and avoid queue limits, consider distributing workloads or using batch priority jobs.
Optimizing table layout is critical. Partitioning divides large tables into smaller segments based on a date or timestamp field, restricting full table scans and minimizing costs. Establish a data expiration policy to automatically purge old partitions. Clustering further improves performance by sorting data within each partition based on commonly queried columns, allowing BigQuery to skip irrelevant data blocks during execution.
Compute resource allocation directly influences speed and cost. Organizations choose between the pay-per-query on-demand model and the flat-rate capacity-based model with dedicated slot reservations. When complex queries exceed resource thresholds, BigQuery returns shuffle size limit errors. To resolve these, analyze slot utilization using the INFORMATION_SCHEMA.JOBS_TIMELINE view, optimize query logic, or increase reservation slots.
Implementing materialized views precomputes and stores the results of frequent, complex queries, dramatically reducing execution time. Materialized views automatically refresh when underlying data changes. They can also cache external data from sources like Amazon S3 or Apache Iceberg directly inside BigQuery, improving performance and eliminating cross-cloud data egress costs.
Prepare and test your skills
Prepare and test your skills
The Cloud Logging Log Router can forward logs to Cloud Storage for long-term archival, to BigQuery for SQL-based analysis, or to Pub/Sub for real-time streaming to external systems.
Project quotas are adjustable limits on resource consumption that can be increased via request or automated tools, while service limits are fixed constraints that cannot be changed.
Partitioning divides large tables by date to restrict full table scans, and clustering sorts data within partitions to skip irrelevant blocks during queries, both improving performance and reducing cost.
Unstarted BigQuery interactive queries time out automatically after 6 hours, while unstarted batch queries time out automatically after 24 hours.