Databricks Certified Data Engineer Associate — Question 146

A data engineer is attempting to write Python and SQL in the same command cell and is running into an error. The engineer thought that it was possible to use a Python variable in a select statement.

Why does the command fail?

Answer options

Correct answer: C

Explanation

The correct answer is C because in Databricks, each cell can only execute code in one language at a time, either Python or SQL, but not both simultaneously. The other options are incorrect as they either misrepresent the capabilities of Databricks or are not applicable to the scenario described.