Databricks Certified Data Engineer Professional — Question 121
Incorporating unit tests into a PySpark application requires upfront attention to the design of your jobs, or a potentially significant refactoring of existing code.
Which benefit offsets this additional effort?
Answer options
- A. Improves the quality of your data
- B. Validates a complete use case of your application
- C. Troubleshooting is easier since all steps are isolated and tested individually
- D. Ensures that all steps interact correctly to achieve the desired end result
Correct answer: C
Explanation
The correct answer, C, is right because unit testing allows each component of the application to be tested independently, making troubleshooting much more manageable. The other options, while beneficial, do not directly address the primary advantage of isolating and testing individual steps, which is crucial for effective debugging.