nerdexam
Microsoft

DP-300 · Question #95

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…

The correct answer is A. Load the data by using PySpark. Synapse notebooks support four Apache Spark languages: PySpark (Python) Note: Bring data to a notebook. You can load data from Azure Blob Storage, Azure Data Lake Store Gen 2, and SQL pool as shown in the code samples below. Read a CSV from Azure Data Lake Store Gen2 as a Spark…

Submitted by renata2k· Mar 6, 2026Develop data processing

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?

Options

  • ALoad the data by using PySpark.
  • BLoad the data by using the OPENROWSET Transact-SQL command in an Azure Synapse
  • CUse a Get Metadata activity in Azure Data Factory.
  • DUse a Conditional Split transformation in an Azure Synapse data flow.

How the community answered

(48 responses)
  • A
    75% (36)
  • B
    6% (3)
  • C
    4% (2)
  • D
    15% (7)

Explanation

Synapse notebooks support four Apache Spark languages: PySpark (Python) Note: Bring data to a notebook. You can load data from Azure Blob Storage, Azure Data Lake Store Gen 2, and SQL pool as shown in the code samples below. Read a CSV from Azure Data Lake Store Gen2 as a Spark DataFrame. from pyspark.sql import SparkSession from pyspark.sql.types import * account_name = "Your account name" container_name = "Your container name" relative_path = "Your path" adls_path = 'abfss://%s@%s.dfs.core.windows.net/%s' % (container_name, account_name, relative_path) df1 = spark.read.option('header', 'true') \ .option('delimiter', ',') \ .csv(adls_path + '/Testfile.csv') https://docs.microsoft.com/en-us/azure/synapse-analytics/spark/apache-spark-development-

Topics

#PySpark#JSON ingestion#Spark pool#data type preservation

Community Discussion

No community discussion yet for this question.

Full DP-300 Practice