Free Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Actual Exam Questions - Question 9 Discussion

Question No. 9
A data engineer is asked to build an ingestion pipeline for a set of Parquet files delivered by an
upstream team on a nightly basis. The data is stored in a directory structure with a base path of
"/path/events/data". The upstream team drops daily data into the underlying subdirectories
following the convention year/month/day.
A few examples of the directory structure are:
Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 practice exam questions
Which of the following code snippets will read all the data within the directory structure?
Select one option, then reveal solution.
US
AY
Andre Y.
2026-02-19

C imo, wildcard should catch all year folders without depending on Spark version.

0
AY
Andre Y.
2026-02-15

Option C makes sense too since using a wildcard like /path/events/data/* should grab all first-level directories (the year folders) and Spark will then read all files inside those folders. It doesn’t rely on recursiveFileLookup, so it works regardless of Spark version. A and D just read the base path without recursion, so they probably miss nested files. B is good if the Spark version supports recursiveFileLookup, but since that info’s missing, C feels like a safer bet.

0
NH
Noah H.
2026-02-09

Maybe C works because the wildcard should match all first-level directories, grabbing all year folders, then Spark can read inside those. B depends on Spark version, which isn’t given.

0
OO
Omar O.
2026-01-30

Actually, I’d rule out A and D because they don’t specify recursive reading, so they’d likely only load files directly under /path/events/data, missing nested folders. C uses a wildcard, but it only expands one level, so it won’t cover the full year/month/day structure. B is the only one explicitly telling Spark to look recursively through all subdirectories, which fits the question’s scenario perfectly—assuming the Spark version supports it.

0
OO
Omar O.
2026-01-29

I think option B is the best here since it explicitly tells Spark to look into all nested folders recursively, which fits the year/month/day structure. Option C with the wildcard might only cover one level of subfolders and miss deeper ones, so it’s less reliable. A and D just read the top-level directory and won’t pick up files inside those nested folders. So B makes the most sense to cover everything without missing data.

0
OO
Omar O.
2026-01-24

B This option explicitly enables recursive lookup, which is necessary to read deeply nested folders like year/month/day. The others either don't recurse or just target the first level.

0
OO
Omar O.
2026-01-22

C imo, using the wildcard * should read all immediate subfolders under the base path without needing recursiveFileLookup. It’s simpler if the nesting isn’t too deep or complicated.

0
CC
Chris C.
2026-01-17

B This option explicitly sets recursiveFileLookup, so it goes through all nested folders, unlike C which stops at one level deep, and A/D which only read the base directory.

0
VN
Vikas N.
2026-01-16

B/C? B is the only one that explicitly enables recursive reading, so it makes sense for nested year/month/day folders. C uses a wildcard but only one level, so it might miss deeper subfolders. A and D are basically the same and won’t go into subdirectories without recursiveFileLookup true. So B seems like the cleanest fit here to catch all nested Parquet files.

0
VN
Vikas N.
2026-01-13

B looks right since recursiveFileLookup lets Spark read all nested folders. The others won’t go deeper than the base folder.

0