DEA-C02 · Question #93
DEA-C02 Question #93: Real Exam Question with Answer & Explanation
The correct answer is C: The WAIT_FOR_COMPLETION clause will block the return of the first ALTER WAREHOUSE. WAIT_FOR_COMPLETION = TRUE in Snowflake's ALTER WAREHOUSE command makes the statement itself synchronous - it holds up the calling thread and does not return control to the pipeline code until the warehouse resize operation has fully completed. This is option C: the first ALTER W
Question
A Data Engineer is reviewing Python data pipeline code that is dynamically scaling warehouse HOL_WH: What effect is the WAIT_FOR_COMPLETION clause having on the pipeline?
Options
- AThe initial ALTER WAREHOUSE command will be blocked until all existing processes on the
- BThe second command will be blocked until the data processing code
- CThe WAIT_FOR_COMPLETION clause will block the return of the first ALTER WAREHOUSE
- DThe WAIT_FOR_COMPLETION clause will allow the processes to run in parallel while the first
Explanation
WAIT_FOR_COMPLETION = TRUE in Snowflake's ALTER WAREHOUSE command makes the statement itself synchronous - it holds up the calling thread and does not return control to the pipeline code until the warehouse resize operation has fully completed. This is option C: the first ALTER WAREHOUSE call blocks its own return, so the next line of Python code won't execute until the warehouse is at the new size.
Why the distractors are wrong:
- A confuses "blocking the command's return" with "blocking existing running processes" - WAIT_FOR_COMPLETION does not drain or queue existing queries on the warehouse; it only holds the ALTER statement itself.
- B incorrectly shifts the blocking to the second command, but the clause acts on the statement it's attached to, not a subsequent one.
- D is the opposite of the truth - WAIT_FOR_COMPLETION enforces sequential (synchronous) behavior, not parallel execution.
Memory tip: Think of it like async/await in reverse - without the clause, ALTER WAREHOUSE fires and immediately returns (async). Adding WAIT_FOR_COMPLETION is like adding await: the statement doesn't hand back control until the job is done. If you need the warehouse fully scaled before data processing begins, this is the clause that enforces that guarantee.
Topics
Community Discussion
No community discussion yet for this question.