Exam DP-203 All QuestionsBrowse all questions from this 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.

    Correct Answer:

Discussion
RutaP

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

tadenet

Multiline, json

evangelist

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.

learnwell

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