Practice Exam

Question 10 of 75

Switch Language In Synapse Analytics Notebooks

You work for MDFT Pro, a well-known training agency that uses Azure Synapse Analytics for advanced data analytics. Mark, the Lead Data Analyst, has assigned you to create a new analytical notebook for processing student performance data.

The notebook will primarily use PySpark for statistical analysis and data transformation, but Mark also needs you to include SQL queries to extract data from the company’s data lake and interact with Spark tables. He wants you to use the appropriate syntax to seamlessly switch between these languages within the same notebook as you work through different analytical tasks.

[comment]: <> (AI-NOTE: The explanation for answer1 (%%python) is misleading. It states “While %%python is valid syntax in Synapse” but %%python is NOT a valid cell magic command in Azure Synapse Analytics notebooks. Synapse supports %%pyspark, %%spark, %%sql, and %%csharp, but not %%python. The explanation should be corrected to state that %%python is not valid in Synapse.)

Which switch should you use to change to the Python language in the Synapse notebook?

Choose the correct answer from the options below.

Explanations for each answer:

Learn more about Mixed Languages In Azure Synapse Analytics Notebooks:
Mixed Languages In Synapse Analytics
Next Question
Discuss this question on social media: