Exam Certified Data Engineer Associate All QuestionsBrowse all questions from this exam
Question 56

A data engineer has a Python notebook in Databricks, but they need to use SQL to accomplish a specific task within a cell. They still want all of the other cells to use Python without making any changes to those cells.

Which of the following describes how the data engineer can use SQL within a cell of their Python notebook?

    Correct Answer: D

    To use SQL within a cell of a Python notebook in Databricks while keeping the rest of the notebook's cells in Python, the data engineer can add %sql to the first line of the specific cell. This magic command allows them to switch the cell to SQL without affecting the other cells.

Discussion
LavpakOption: D

Use magic command %sql

MFESTOption: D

correct answer D

azure_bimonsterOption: D

Magic command % can be used to switch the language, so D is correct

bartftoOption: D

D. Correct. Use %sql magic in first line.