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.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
Last updated
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?
Configure Cloud Build to execute all Apache Beam unit tests directly on Cloud Dataflow using the DataflowRunner, and trigger a production Cloud Composer DAG run to validate BigQuery schemas.
Configure a multi-step Cloud Build trigger that runs static analysis and DAG parse checks with pytest, executes Apache Beam unit tests with TestPipeline and DirectRunner, performs BigQuery schema and integration tests using environment-specific service accounts, and stages Dataflow templates and DAGs only upon step completion.
Configure Cloud Build to stage Apache Beam templates and upload DAG files directly to the production Cloud Composer environment bucket, and configure Cloud Monitoring alerts to roll back changes if runtime parsing errors occur.
Configure Cloud Build to run the Data Validation Tool (DVT) directly against the production BigQuery dataset and execute Cloud Composer CLI commands inside a Compute Engine VM to compile Apache Beam JAR files.
Configure Cloud Build to execute all Apache Beam unit tests directly on Cloud Dataflow using the DataflowRunner, and trigger a production Cloud Composer DAG run to validate BigQuery schemas.
Configure a multi-step Cloud Build trigger that runs static analysis and DAG parse checks with pytest, executes Apache Beam unit tests with TestPipeline and DirectRunner, performs BigQuery schema and integration tests using environment-specific service accounts, and stages Dataflow templates and DAGs only upon step completion.
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.Configure Cloud Build to stage Apache Beam templates and upload DAG files directly to the production Cloud Composer environment bucket, and configure Cloud Monitoring alerts to roll back changes if runtime parsing errors occur.
Configure Cloud Build to run the Data Validation Tool (DVT) directly against the production BigQuery dataset and execute Cloud Composer CLI commands inside a Compute Engine VM to compile Apache Beam JAR files.