Databricks Certified Data Engineer Associate · Free Practice Question Medium

Question 8

A data analyst needs to enhance their Databricks notebook by adding complex data visualizations created with R, alongside existing Python analytics code. What is the best approach?
  • A Convert R visualization code to Python before integrating.
  • B

    Use the %r magic command in new cells specifically for R-based visualizations.

  • C Export the data from Python to an R script outside Databricks.
  • D Rewrite the Python analytics code in R for consistency.
Reveal correct answer

Correct answer: B

Explanation

By using the %r magic command, the analyst can seamlessly integrate R for data visualization without altering the existing Python analytics code. This approach utilizes Databricks' support for multiple languages to enhance data analysis and visualization within a single notebook.

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