
Answer-first summary for fast verification
Answer: Utilize %sql for data extraction cells and %python for machine learning cells.
The correct approach is to use %sql for data extraction cells and %python for machine learning cells. This method allows both the data engineer and the data scientist to work within the same notebook using their preferred languages without compromising the notebook's functionality or efficiency.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A data science team is working together on a Databricks notebook. The data engineer prefers SQL for data extraction, whereas the data scientist leans towards Python for machine learning tasks. What is the best approach to accommodate both preferences within the same notebook?
A
Merge all code into Python to ensure consistency throughout the notebook.
B
Convert SQL queries to Python pandas queries to maintain uniformity.
C
Utilize %sql for data extraction cells and %python for machine learning cells.
D
Develop separate notebooks for SQL and Python code, then link them together.