professional-cloud-data-engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
A financial analytics organization is implementing a CI/CD workflow using Cloud Build to automate testing and quality assurance for their data platform. The codebase includes Apache Beam pipelines intended for Cloud Dataflow, workflow DAGs for Cloud Composer, and schema definitions for BigQuery tables.
The engineering team needs to enforce the following quality assurance lifecycle before code is promoted to production:
DoFn transforms in isolation without provisioning cloud infrastructure.How should the team design their Cloud Build CI/CD pipeline to meet these requirements?
This solution implements an automated, multi-stage continuous integration and testing pipeline using Cloud Build to validate data pipeline code before deployment. It leverages isolated containerized build steps to sequentially execute static code analysis, Apache Beam unit testing with local runners, integration validation against staging services, and conditional deployment artifact staging.
pytest on Cloud Composer DAG files. This validates Python syntax, catches missing dependencies, and ensures DAGs load without cycles or import errors before any deployment occurs.DoFn transforms and pipeline logic are tested using Beam's built-in TestPipeline with the DirectRunner. This allows for deterministic in-memory execution on synthetic test data without spinning up cloud resources or incurring Dataflow runner costs.TestPipeline with DirectRunner ensures transforms behave as pure functions with predictable inputs and outputs.Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.