DP-203 Exam QuestionsBrowse all questions from this exam

DP-203 Exam - Question 246


DRAG DROP

-

You have an Azure Databricks deployment and a local file named /tmp/file1 that contains the following code.

You need to read /tmp/file1 into a data frame by using Scala.

How should you complete the code? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

NOTE: Each correct selection is worth one point.

Show Answer
Correct Answer:

Discussion

4 comments
Sign in to comment
tadenet
Jun 5, 2024

Multiline, json

RutaP
Jun 14, 2024

it should be Multiline and json I think. Refer this link https://learn.microsoft.com/en-us/azure/databricks/query/formats/json

learnwell
Jun 29, 2024

It should definitely be Multiline, json. The link shared by RutaP explains it.

evangelist
Jul 15, 2024

The multiline option is necessary when reading JSON files that span multiple lines per record. In the given example, each JSON object in the array is spread over several lines, which is typical for nested or complex JSON structures. Without enabling the multiline option, Spark would expect each JSON record to be on a single line, and it would not be able to correctly parse the provided file.