nerdexam
Microsoft

DP-500 · Question #124

The enterprise analytics team needs to create a view for the survey response data. The solution must meet the technical requirements. How should you complete the code? To answer, select the…

To create a view for survey response data, which is in JSON format, using OPENROWSET, the FORMAT option must be set to 'json'. The other options like FIELDTERMINATOR, FIELDQUOTE, and ROWTERMINATOR are for delimited text files and are not applicable here. JSON_VALUE and PARSE…

Implement and manage data models

Question

The enterprise analytics team needs to create a view for the survey response data. The solution must meet the technical requirements. How should you complete the code? To answer, select the appropriate options in the answer area.

Exhibit

DP-500 question #124 exhibit

Explanation

To create a view for survey response data, which is in JSON format, using OPENROWSET, the FORMAT option must be set to 'json'. The other options like FIELDTERMINATOR, FIELDQUOTE, and ROWTERMINATOR are for delimited text files and are not applicable here. JSON_VALUE and PARSE are functions used for querying JSON content, not for specifying the format within OPENROWSET.

The complete code should be:

CREATE VIEW dbo.SurveyAnswers AS
SELECT doc
FROM
OPENROWSET(
    BULK 'https://mydatalake.dfs.core.windows.net/UserExp/Raw/SurveyAnswers*.json',
    FORMAT = 'json',
    WITH (doc NVARCHAR(MAX)) AS rows
);

Topics

#View creation#Data modeling#Calculated tables#DAX

Community Discussion

No community discussion yet for this question.

Full DP-500 Practice