Databricks-DE-Assoc Data Ingestion and Loading Practice Question
A data engineer is using Auto Loader to ingest files from an S3 bucket into a Delta table. The files are partitioned by date in the path, e.g., s3://bucket/data/2023-01-01/file1.json. The engineer wants to automatically add a column 'date' to the ingested data based on the file path. Which Auto Loader feature should be used?
⚠ Common exam trap
The trap here is assuming that schema hints can define columns that do not exist in the data files, when they only override types for existing columns.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use the cloudFiles.partitionColumns option to specify 'date'.
Auto Loader can automatically extract partition columns from directory structures using the cloudFiles.partitionColumns option. When you specify the column names, Auto Loader parses the file path and creates corresponding columns in the DataFrame, populating them with the values from the path. This is the standard method for incorporating path-based partitioning into the ingested data without manual parsing. Other options like schema hints or format settings do not provide this capability, and incremental listing is unrelated.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use the cloudFiles.useIncrementalListing option to parse the path.
Why it's wrong here
The cloudFiles.useIncrementalListing option controls whether Auto Loader uses incremental file listing to reduce listing costs. It does not parse or extract any information from file paths. It is purely a performance optimization for file discovery. Enabling it would not create a 'date' column. Thus, it is irrelevant to the requirement of adding a column based on the path.
- ✗
Use the cloudFiles.format option set to 'json' and then use a SQL expression to extract the date.
Why it's wrong here
The cloudFiles.format option specifies the file format, such as 'json', 'csv', etc. While you could later use SQL expressions on the input_file_name() to extract the date, Auto Loader does not automatically do this. The engineer would need to add a transformation step after ingestion. This is not a direct feature of Auto Loader for path-based column extraction. Therefore, it is not the correct option for automatically adding the column during ingestion.
- ✗
Use the cloudFiles.schemaHints option to define 'date' as a string column.
Why it's wrong here
The cloudFiles.schemaHints option is used to provide explicit schema information for columns in the data files, such as specifying data types or overriding inferred types. It does not extract values from the file path. If you define 'date' as a schema hint, you are telling Auto Loader that the data files contain a column named 'date', which they do not. This would likely result in null values or errors. Therefore, it does not achieve the goal of deriving a column from the path.
- ✓
Use the cloudFiles.partitionColumns option to specify 'date'.
Why this is correct
The cloudFiles.partitionColumns option allows Auto Loader to automatically extract partition columns from the file path and add them as columns in the ingested data. By specifying 'date', Auto Loader will parse the path structure and create a 'date' column with the corresponding value from the directory name. This is the intended feature for this scenario, as it avoids manual parsing of file paths. It is efficient and integrates seamlessly with the schema inference.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
About these practice questions
One of 276 original Databricks-DE-Assoc practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Databricks exam blueprint
This Databricks-DE-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-DE-Assoc exam.