Microsoft

DP-300 practice question 12

Administering Microsoft Azure SQL Solutions · free question 12 of 20

Question

You have an Azure Synapse Analytics Apache Spark pool named Pool1. You plan to load JSON files from an Azure Data Lake Storage Gen2 container into the tables in Pool1. The structure and data types vary by file. You need to load the files into the tables. The solution must maintain the source data types. What should you do?
  • A. Load the data by using PySpark. Correct
  • B. Load the data by using the OPENROWSET Transact-SQL command in an Azure Synapse Analytics serverless SQL pool.
  • C. Use a Get Metadata activity in Azure Data Factory.
  • D. Use a Conditional Split transformation in an Azure Synapse data flow.

Explanation

PySpark runs directly on the Spark pool, and its JSON reader infers each file's schema, including its data types, so it handles files whose structure varies and can write them to the pool's tables. OPENROWSET runs in the serverless SQL pool, not in Pool1, and requires you to define how the JSON is parsed. A Get Metadata activity only returns information about files, and a Conditional Split only routes rows, so neither loads the data while keeping its types.

Need the theory? Learn it free in the DP-300 course on Godlike Academy

Practice the whole free set

Answer all 20 free DP-300 questions with instant feedback, or unlock all 373 questions with Learn and Exam modes.