You work for MDFT Pro, a well-known training agency that stores enrollment and payment data in an Azure Data Lake Storage Gen2 account. Mark, the Business Analyst, has asked you to perform exploratory analysis of course enrollment data using an Azure Synapse Analytics serverless SQL pool. The data files are organized in CSV format within the data lake, and Mark specifically wants to analyze enrollment records from the 2020 academic year. You need to write a query that correctly identifies which data files will be included based on the BULK pattern specified in the OPENROWSET function.
You execute the following Transact-SQL query:
SELECT
payment_type,
SUM (fare_amount) AS fare_total
FROM OPENROWSET (
BULK 'csv/enrollment/coursedata 2020*.csv',
DATA_SOURCE = 'EnrollmentData',
FORMAT = 'CSV',
PARSER VERSION = '2.0',
FIRSTROW = 2
)
WITH (
payment_type INT 10,
fare_amount FLOAT 11
) AS enrollments
GROUP BY payment_type
ORDER BY payment_type;
Which files in the csv/enrollment folder will be included in the query results?
Choose the correct answer from the options below.
Explanations for each answer: