QuestionQ164

VerifiedCost & Performance Optimisation

The following code was migrated from a legacy workload into a Databricks notebook:

Question Image

The code runs successfully and produces logically correct results; however, extracting and loading approximately 1 GB of data takes more than 20 minutes.

Which statement could explain this behavior?

Explanation

Databricks %sh commands run only on the Apache Spark driver, not on worker nodes. Consequently, the shell-based clone, Python program, and file move execute without distributed Spark processing or worker parallelism, making a long runtime for the data load plausible.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!