Certified Data Engineer Associate Exam QuestionsBrowse all questions from this exam

Certified Data Engineer Associate 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?

Show Answer
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

4 comments
Sign in to comment
MFESTOption: D
Oct 30, 2023

correct answer D

LavpakOption: D
Nov 23, 2023

Use magic command %sql

bartftoOption: D
Jan 9, 2024

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

azure_bimonsterOption: D
Jan 20, 2024

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