Courseiva
Ingest and Transform DatamediumMultiple ChoiceObjective-mapped

DP-700 Ingest and Transform Data Practice Question

You are performing a large-scale data migration into a Fabric Lakehouse using a Spark Notebook. You notice that the job is failing with an 'Out of Memory' error. What is the most effective way to address this while utilizing PySpark?

⚠ Common exam trap

Candidates often suggest increasing the driver or executor memory as the first step, ignoring that OOM errors are frequently caused by data skew or unbalanced partitions that repartitioning resolves.

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

Use df.repartition() to redistribute data

Out of Memory (OOM) errors in Spark often result from unbalanced partitions or attempting to load too much data into a single executor. By increasing the number of partitions (repartitioning) or adjusting the cluster configuration, you redistribute the workload across the Spark executors. This is a fundamental skill for data engineers to master, as it allows for processing massive datasets efficiently without requiring constant hardware upgrades or job failures.

Answer analysis

Option-by-option breakdown

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

  • Increase the cluster node count significantly

    Why it's wrong here

    Adding more nodes does not solve OOM errors if the individual data partitions are too large for the existing executor memory. You must first ensure the data distribution is balanced before scaling out the cluster, otherwise you are just adding more nodes that will also hit OOM.

  • Use df.repartition() to redistribute data

    Why this is correct

    Repartitioning the DataFrame increases the number of partitions, which reduces the size of each partition. This ensures that each Spark executor processes a smaller, more manageable chunk of data, which effectively prevents the OOM error by staying within the memory limits of the individual executor nodes.

  • Convert the data to JSON format before loading

    Why it's wrong here

    Converting data to JSON increases the storage footprint and parsing time. JSON is a text-based format that is much heavier to process than binary formats like Parquet or Delta, which would likely worsen the memory pressure rather than alleviate the OOM issue during the processing step.

  • Disable the Spark broadcast join optimization

    Why it's wrong here

    Broadcasting is an optimization for joins. Disabling it might prevent OOMs caused specifically by large tables being sent to all nodes, but it is not the primary way to fix general memory errors in a data transformation notebook. Repartitioning is a more direct and reliable solution.

About these practice questions

This DP-700 question is part of Courseiva's 152-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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

This DP-700 practice question is part of Courseiva's free Microsoft 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 DP-700 exam.