Microsoft Certified Azure Data Engineer Associate · Free Practice Question Easy

Question 22

How do you cache data into the memory of the local executor for instant access?

  • A

    .cacheLocalExe()

  • B

    .cache()

  • C

    .inMemory().save()

  • D

    .save().inMemory()

Reveal correct answer

Correct answer: B

Explanation

The .cache() method is an alias for .persist(). Calling this moves data into the memory of the local executor.

A. The .cacheLocalExe() method is not a valid method in Apache Spark for caching data into the memory of the local executor. This method does not exist in the Apache Spark API for caching data and would not provide instant access to the cached data.

B. The .cache() method is used in Apache Spark to cache data into the memory of the local executor for instant access. It allows for faster access to the cached data during subsequent operations without having to recompute or reload it from the source.

C. The .inMemory().save() method is not a valid method in Apache Spark for caching data into the memory of the local executor. This combination of methods does not achieve the goal of caching data for instant access.

D. The .save().inMemory() method does not exist in Apache Spark for caching data into the memory of the local executor. This combination of methods is not valid and does not serve the purpose of caching data for instant access.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need