Courseiva
hardMultiple Choice

PMLE Practice Question: A team uses Cloud Composer to orchestrate a…

A team uses Cloud Composer to orchestrate a complex ML pipeline with many tasks. They notice that the DAG parsing time is very high, causing delays in task scheduling. Which action would most effectively reduce DAG parsing time?

⚠ Common exam trap

Google Cloud often tests the misconception that reducing the number of DAG files or increasing scheduler resources will fix parsing delays, when the real bottleneck is the top-level code execution inside each DAG file.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Optimize DAG files to avoid heavy top-level imports and database queries

Heavy top-level imports and database queries in DAG files are executed every time the scheduler parses the DAG, which happens frequently (default every 30 seconds). By moving imports inside Python callables or using lazy loading, the parsing time is drastically reduced, allowing the scheduler to process DAGs faster and trigger tasks without delay.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Remove all DAG files that are not currently needed from the bucket

    Why it's wrong here

    Removing unneeded DAG files reduces the number of files parsed, but the reported delay stems from parsing the complex pipeline's own DAG, which remains. It is tempting because deleting files obviously cuts parsing load, yet the fix must target the heavy DAG's top-level imports and code.

  • ✗

    Increase the parallelism of the Airflow scheduler

    Why it's wrong here

    Scheduler parallelism controls how many task instances run concurrently, not how quickly DAG files are parsed, so parsing delays persist. It is tempting because raising parallelism speeds overall pipeline throughput, which is its real purpose, but parsing time depends on file count, imports and top-level code.

  • ✓

    Optimize DAG files to avoid heavy top-level imports and database queries

    Why this is correct

    The scheduler parses every DAG file repeatedly, so heavy top-level imports and database queries executed at parse time inflate parsing duration and delay scheduling. Moving such work inside tasks or using lazy loading cuts parsing time directly.

  • ✗

    Combine all DAGs into a single file

    Why it's wrong here

    Merging DAGs into one file concentrates all parsing work into a single file, increasing per-file parse duration rather than reducing total parsing time. It is tempting because fewer files appear tidier, but Airflow parses each file independently, so splitting DAGs and trimming top-level imports is what shortens parsing.

About these practice questions

This PMLE question is part of Courseiva's 775-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.