Prepare and test your skills

Prepare and test your skills

Serverless orchestration with Google Cloud Workflows coordinates HTTP-based services without managing servers. Workflows executes a state machine defined in YAML or JSON that calls microservices, infrastructure tasks, and external systems in order. The service depends on Cloud Scheduler for time-driven triggers and on service accounts for secure access, and it can trigger downstream work in Dataform (opens in a new tab) and BigQuery (opens in a new tab).
Low-latency orchestration of microservices and APIs is the core use of Workflows. Workflows sends requests from the Workflows service to each HTTP-based service in sequence, so control and data flow from one service to the next. This pattern fits chaining microservices together, automating infrastructure tasks, integrating with external systems, and running multiple BigQuery jobs in parallel. Workflows does not perform data transformation and processing itself, where transformation frameworks inside the warehouse handle the logic.
Time-driven scheduling with Cloud Scheduler and Dataform runs transformation code on a fixed frequency. A Cloud Scheduler job triggers a Workflows workflow at the configured frequency, and Workflows then executes the Dataform workflow. First, Workflows pulls Dataform repository code from the Git provider and compiles it into a compilation result, then Workflows uses that compilation result to create a workflow invocation and executes it. Calling createCompilationResult with gitCommitish requires Dataform to clone the remote Git repository over the network on every run. Because external network connections can be temporarily unreliable during frequent or concurrent compilations, production schedules should use release configurations or configure automated retries with exponential backoff, trading per-run freshness of Git code for reliability and resource efficiency.
Permissions and secure access for orchestration workflows center on a service account used as the workflow identity. The service account acts when Workflows calls Dataform and manages the orchestration workflow, so the policy applies to the workflow rather than to an individual user. Grant the service account the following roles:
roles/dataform.editor) to create compilation results and workflow invocationsroles/iam.serviceAccountUser) on the custom service account used in Dataform to act as that identityWhen the workflow configuration owner changes to a Google Account that has never created a workflow configuration, manual approval through the OAuth dialog is required before Workflows can obtain an access token on behalf of that account.
Choosing Workflows among scheduling tools depends on workload shape, user profile, and code type. Dataform focuses on data transformation in SQL, Workflows focuses on microservices in YAML or JSON, Managed Airflow focuses on ETL or ELT in Python, and Vertex AI Pipelines focuses on machine learning in Python. The following comparison summarizes when each tool fits:
| Tool | Focus | Code type | Serverless | Not suitable for |
|---|---|---|---|---|
| Dataform | Data transformation | JavaScript, SQL, Python notebooks | Yes | Chains of external services |
| Workflows | Microservices | YAML or JSON | Yes | Data transformation and processing |
| Managed Airflow | ETL or ELT | Python | Fully managed | Low latency or event-driven pipelines |
| Vertex AI Pipelines | Machine learning | Python | Yes | Infrastructure tasks |
Choose Workflows when the problem is coordinating existing services with low latency, and choose Dataform or Managed Airflow when the problem is transforming data or running complex ETL dependencies.
Exam tip: Choose Workflows for low-latency chains of HTTP-based services and external systems, not for data transformation logic that belongs in Dataform.
Orchestration selection, security, and operational resilience determine whether a pipeline is fast, least-privilege, and recoverable. Workflows (opens in a new tab) handles serverless orchestration of HTTP-based services, while Managed Service for Apache Airflow (Managed Airflow), formerly Cloud Composer, handles data-driven ETL/ELT pipelines expressed as Python DAGs. Security depends on a user-managed service account, narrow Identity and Access Management (IAM) roles, and Secret Manager as a secret backend, while resilience depends on managed infrastructure with Cloud Logging and Cloud Monitoring.
Choosing between Workflows and Managed Airflow starts with architecture type and latency tolerance. Workflows orchestrates multiple HTTP-based services into a durable and stateful workflow with millisecond execution latency, high execution volume, and scale down to zero. Managed Airflow orchestrates batch data workflows across clouds and on-premises, tolerates a few seconds of latency between tasks, and supports backfills and DAG re-runs for data processing. Workflows integrates through HTTP requests and connectors, including simple sequences against Cloud Storage and BigQuery, while Managed Airflow integrates through Airflow Operators and Sensors, with over 150 operators for Google Cloud alone. Workflows uses YAML or JSON with imperative flow control and passes up to 512 KB in variables between steps, while Managed Airflow uses Python Directed Acyclic Graph (DAG) files with declarative dependency resolution and passes up to 48 KB through XCom between tasks.
| Dimension | Workflows | Managed Airflow |
|---|---|---|
| Best fit | Chaining microservices, infrastructure automation, external integrations | Batch ETL/ELT, triggering BigQuery jobs or Dataflow pipelines |
| Triggers | gcloud CLI, console, Workflows API, client libraries, Cloud Scheduler | Cron-like schedules in DAG files, Sensors |
| Async and parallel | Polling, callbacks, wait for long-running Google Cloud operations; concurrent executions or parallel steps | Polling; automatic parallelism from task dependencies |
| Scaling and billing | Serverless scaling; usage-based per step executed | Provisioned capacity; billed on provisioned capacity |
Exam tip: Choose Workflows when millisecond latency and per-step billing matter, and choose Managed Airflow when the pipeline needs backfills, re-runs, and cron-like batch scheduling with seconds-level latency.
Identity, service accounts, and secret handling enforce least privilege for orchestration. Secure orchestration in Managed Airflow centers on a dedicated user-managed service account that owns the environment and runs the DAGs. A typical ETL identity needs Composer Worker (roles/composer.worker) as the baseline, plus only the extra data permissions the DAGs require, such as BigQuery Data Editor and Storage Object Admin for human operators or BigQuery Admin, Storage Object Admin, Dataflow Admin, and Dataflow Worker for a combined Composer and Dataflow pipeline. The Managed Airflow control plane has its own identity boundary through the Cloud Composer Service Agent, service-PROJECT_NUMBER@cloudcomposer-accounts.iam.gserviceaccount.com, which requires the Cloud Composer v2 API Service Agent Extension role (roles/composer.ServiceAgentV2Ext) for Composer 2 environments. Human access follows the same boundary with Environment and Storage Object Administrator plus Service Account User to create and deploy, while Workforce Identity Federation grants access only after an external identity provider is configured and IAM roles are granted, and the environment bucket must use uniform bucket-level access. Secrets move out of code into Secret Manager when used as the Airflow secret backend, which requires secretmanager.googleapis.com alongside core dependencies and read-only secret access for the environment service account. When Cloud Key Management Service (Cloud KMS) or customer-managed encryption keys (CMEK) protect the environment, cloudkms.googleapis.com must be enabled and the customer must maintain key permissions and rotation.
Operational resilience through logging, monitoring, and shared responsibility keeps Managed Airflow recoverable and observable. A Managed Airflow environment provisions a Google Kubernetes Engine (GKE) cluster, an Airflow web server, an environment bucket, and supporting services including Cloud SQL, Pub/Sub, and Artifact Registry. Airflow schedulers, triggerers, and workers run as GKE workloads and execute DAG tasks, while Composer Agent and Airflow Monitoring run in the same cluster to gather logs to Cloud Logging and metrics to Cloud Monitoring. Google owns hardening and patching of environment components and underlying infrastructure, including auto-upgrades of GKE and Cloud SQL, default encryption at rest, encryption in transit, and IAM, Cloud Audit Logs, and Cloud KMS integrations. The customer owns DAG compatibility with the selected Airflow version, timely upgrades to supported Managed Airflow versions, and correct IAM on the environment service account, bucket, and CMEK keys. Reliable provisioning follows an explicit dependency order where each resource depends on the prior layer:
composer.googleapis.com plus compute.googleapis.com, logging.googleapis.com, monitoring.googleapis.com, storage.googleapis.com, cloudresourcemanager.googleapis.com, servicedirectory.googleapis.com, pubsub.googleapis.com, sqladmin.googleapis.com, and conditional APIs such as Secret Manager, Cloud KMS, Artifact Registry, Cloud Build, and Container.This order prevents environments that cannot schedule because logging, monitoring, storage, or identity permissions are missing. Because Managed Airflow bills on provisioned capacity rather than scaling to zero, resilience planning also means sizing for peak DAG concurrency and retaining backfill and re-run capability.
Cloud Composer DAG design and environment optimization define how batch pipelines run reliably at scale. Cloud Composer, implemented as Managed Airflow, is the managed orchestration service for defining dependency-aware batch pipelines as Directed Acyclic Graphs (DAGs). A DAG file declares an ordered series of tasks and their dependencies, and Cloud Composer executes those tasks against Google Cloud services while state and code live in Cloud Storage. Efficient design keeps heavy processing in ephemeral compute and keeps the DAG itself lightweight, deterministic, and recoverable.
DAG authoring for dependency-aware pipelines uses Python files stored in a Cloud Storage bucket attached to the environment. A Cloud Composer DAG defines a sequence of tasks that run only after their upstream dependencies succeed, so task order enforces validation before processing and cleanup only after processing completes. Because batch pipelines can be recreated after a disruption, recovery focuses on data in Cloud Storage and the metadata store rather than the running orchestrator. A batch point-of-sale pattern shows how a DAG coordinates ephemeral processing:
Data flows from Cloud Storage to the ephemeral Spark cluster for transformation, then to the data lake in columnar formats such as Parquet and ORC, with table metadata in Dataproc Metastore. The DAG depends on the ingestion bucket, the Spark service, and the destination storage.
Specialized Google Cloud operators in DAGs let a DAG trigger managed services without custom polling logic. For Dataform (opens in a new tab) scheduling, Managed Airflow 2 provides Dataform operators that create a compilation result and then create a workflow invocation from that result. The DAG is written with standard Airflow DAG parameters such as schedule_interval, start_date, catchup, and tags, then uploaded to the environment's bucket for scheduling. Dataform operations commonly used from a DAG include:
DataformCreateCompilationResultOperator to compile repository code into a named compilation resultDataformCreateWorkflowInvocationOperator to start a workflow invocation from a compilation result, often wired with {{ task_instance.xcom_pull('create_compilation_result')['name'] }}The dependency create_compilation_result >> create_workflow_invocation ensures that compilation finishes first and its output name flows into the invocation task. On Managed Airflow 2 version 2.0.25 and later, the google-cloud-dataform PyPI package is preinstalled, while earlier environments must install ==0.2.0 through the PyPI packages configuration.
Exam tip: For production Dataform scheduling, use release configurations instead of passing git_commitish on every run, because git_commitish forces Dataform to clone the remote Git repository over the network and can fail under frequent or concurrent compilations.
Environment optimization for scalable execution centers on minimizing always-on resources and making reruns reliable. Using ephemeral Spark clusters that live only for the processing stage avoids idle compute, while retry strategies on ingestion and compilation handle transient Cloud Storage and network failures. Processed outputs in efficient columnar storage and centralized logs and metrics further reduce repeated work during troubleshooting. Reliability practices directly improve scalability under load because a DAG compiled from a release configuration starts every run from a stable artifact and avoids added network pressure. When external or downstream systems are involved, batching requests and configuring automated retries with exponential backoff on the operator prevents a slow dependency from triggering unnecessary scale-out and quota exhaustion.
gitCommitish on every run to avoid Git clone failures under frequent or concurrent compilations.Choose Google Cloud Workflows when coordinating existing HTTP-based microservices and external systems with millisecond latency and usage-based per-step billing, and choose Managed Airflow when running batch ETL or ELT pipelines that need backfills, re-runs, and cron-like scheduling with seconds-level latency. Workflows defines durable and stateful workflows in YAML or JSON and scales down to zero, while Managed Airflow defines Python Directed Acyclic Graph files with declarative dependencies and bills on provisioned capacity.
A Cloud Scheduler job triggers a Google Cloud Workflows workflow at the configured frequency, and Workflows then executes the Dataform workflow. Workflows first pulls Dataform repository code from the Git provider and compiles it into a compilation result, then uses that compilation result to create a workflow invocation and executes it.
The service account needs the Dataform Editor role to create compilation results and workflow invocations, the Service Account User role on the custom service account used in Dataform to act as that identity, and the minimum permissions required to manage the orchestration workflow and access its target Google Cloud resources. The policy applies to the workflow rather than to an individual user.
An enterprise is designing a centralized orchestration solution for complex batch ETL/ELT pipelines spanning multiple Google Cloud services and on-premises data sources. The architecture must satisfy the following operational, security, and resilience requirements:
Which architecture and configuration should the organization deploy?
Last updated